diff options
| author | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2009-01-19 15:38:38 +0000 |
|---|---|---|
| committer | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2009-01-19 15:38:38 +0000 |
| commit | afb0901283052b06d75f04694f942139f424f177 (patch) | |
| tree | 317f8424ac9099848d7b6ae22229487b0f3f08e6 /trunk/src/mkbuild | |
| parent | 16db13c00959aa09586f54701a55f49ee92de190 (diff) | |
| download | simplepkg-afb0901283052b06d75f04694f942139f424f177.tar.gz simplepkg-afb0901283052b06d75f04694f942139f424f177.tar.bz2 | |
mkbuild: adding import routines
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@755 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk/src/mkbuild')
| -rwxr-xr-x | trunk/src/mkbuild | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/trunk/src/mkbuild b/trunk/src/mkbuild index c348038..00d6ac2 100755 --- a/trunk/src/mkbuild +++ b/trunk/src/mkbuild @@ -78,6 +78,12 @@ ${red}DESCRIPTION${normal} commit .mkbuild in svn mkbuild tree ${red}-ca${normal}, ${red}--commit-all${normal} commit SlackBuild and .mkbuild files in svn tree + ${red}-im${normal}, ${red}--import-mkbuilds${normal} + import mkbuild repository in a svn tree + ${red}-is${normal}, ${red}--import-slackbuilds${normal} + import SlackBuild repository in a svn tree + ${red}-ia${normal}, ${red}-i${normal}, ${red}--import-all${normal}, ${red}--import${normal} + import mkbuild and SlackBuild repositories in a svn tree ${red}-h${normal}, ${red}--help${normal} this help mesage ${red}-n${normal}, ${red}--new${normal} ${green}<mkbuild_name>${normal} @@ -171,6 +177,24 @@ function set_parameters { MKBUILD_NAME="${2//.mkbuild}.mkbuild" break # we need to break otherwise commit log message is evalued ;; + '-is'|'--import-slackbuilds') + # Commit SlackBuild file + ACTION="import_slackbuilds" + MKBUILD_NAME="${2//.mkbuild}.mkbuild" + break # we need to break otherwise specific arguments are evalued + ;; + '-im'|'--import-mkbuilds') + # import mkbuild file + ACTION="import_mkbuilds" + MKBUILD_NAME="${2//.mkbuild}.mkbuild" + break # we need to break otherwise specific arguments are evalued + ;; + '-ia'|'-i'|'--import-all'|'--import') + # Commit SlackBuild and mkbuild file + ACTION="import_all" + MKBUILD_NAME="${2//.mkbuild}.mkbuild" + break # we need to break otherwise specific arguments are evalued + ;; '-um'|'--update-manifest') ACTION="update_manifest" MKBUILD_NAME="${2//.mkbuild}.mkbuild" @@ -692,6 +716,36 @@ function submit_cleanup { } +function import_mkbuilds { + + # import mkbuilds into a subversion repository + # usage: repository_import [repository] + + local repository="$1" + + if [ -z "$repository" ]; then + repository="file:////var/svn/mkbuilds" + fi + + repository_import $MKBUILDS_DIR $repository + +} + +function import_slackbuilds { + + # import SlackBuilds into a subversion repository + # usage: repository_import [repository] + + local repository="$1" + + if [ -z "$repository" ]; then + repository="file:////var/svn/slackbuilds" + fi + + repository_import $SLACKBUILDS_DIR $repository + +} + # ---------------------------------------------------------------- # general functions # ---------------------------------------------------------------- @@ -1398,6 +1452,20 @@ function edit_mkbuild { } +function delete_mkbuilds { + + # TODO + true + +} + +function delete_slackbuilds { + + # TODO + true + +} + # ---------------------------------------------------------------- #============================= @@ -1470,6 +1538,19 @@ if [ ! -z "$MKBUILD_NAME" ]; then commit_changes $SLACKBUILDS_DIR $MKBUILD_BASENAME: $* commit_changes $MKBUILDS_DIR $MKBUILD_BASENAME: $* ;; + 'import_slackbuilds') + shift + import_slackbuilds $* + ;; + 'import_mkbuilds') + shift + import_mkbuilds $* + ;; + 'import_all') + shift + import_mkbuilds $* + import_slackbuilds $* + ;; 'new') create_mkbuild ;; |
