diff options
Diffstat (limited to 'trunk')
-rw-r--r-- | trunk/doc/CHANGELOG | 2 | ||||
-rw-r--r-- | trunk/lib/common.sh | 10 | ||||
-rwxr-xr-x | trunk/src/mkbuild | 50 |
3 files changed, 35 insertions, 27 deletions
diff --git a/trunk/doc/CHANGELOG b/trunk/doc/CHANGELOG index 496b764..c1e396f 100644 --- a/trunk/doc/CHANGELOG +++ b/trunk/doc/CHANGELOG @@ -22,6 +22,8 @@ simplepkg changelog - default configuration making createpkg repository integrated with simplaret - new repositories - mkbuild: + - all previous "commit" functions and command line options changed to "submit" as they + don't really commit files into the svn repository - function svn_mkdir moved to common.sh - function svn_add moved to common.sh and renamed as svn_copy - some svn check routines extended for git diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh index 45fd6ae..15bad2f 100644 --- a/trunk/lib/common.sh +++ b/trunk/lib/common.sh @@ -569,8 +569,14 @@ function sync_repo { # input: $1 - svn directory name # $2 - svn address [ $# -ne 2 ] && exit 5 - cd $1 - su_svn update || build_repo $1 $2 + + local folder url + folder="$1" + url="$1" + + mkdir -p $folder + cd $folder + su_svn update || build_repo $folder $url } diff --git a/trunk/src/mkbuild b/trunk/src/mkbuild index 951252e..653c2b3 100755 --- a/trunk/src/mkbuild +++ b/trunk/src/mkbuild @@ -69,12 +69,12 @@ ${red}DESCRIPTION${normal} Program options: ${red}-d${normal}, ${red}--debug${normal} enable debug mode - ${red}-cs${normal}, ${red}--commit-slackbuild${normal} - commit SlackBuilds in local svn SlackBuild tree - ${red}-cm${normal}, ${red}--commit-mkbuild${normal} - commit .mkbuild in local svn mkbuild tree - ${red}-c${normal}, ${red}--commit-all${normal} - commit SlackBuild and .mkbuild files in local svn tree + ${red}-ss${normal}, ${red}--submit-slackbuild${normal} + submit SlackBuilds in local svn SlackBuild tree + ${red}-sm${normal}, ${red}--submit-mkbuild${normal} + submit .mkbuild in local svn mkbuild tree + ${red}-sa${normal}, ${red}--submit-all${normal} + submit SlackBuild and .mkbuild files in local svn tree ${red}-h${normal}, ${red}--help${normal} this help mesage ${red}-n${normal}, ${red}--new${normal} ${green}<mkbuild_name>${normal} @@ -89,8 +89,8 @@ ${red}DESCRIPTION${normal} print debug information ${red}EXAMPLES${normal} - ${red}mkbuild -c pyrex.mkbuild${normal} - build pyrex.SlackBuild and commit .mkbuild and .SlackBuild in + ${red}mkbuild -sa pyrex.mkbuild${normal} + build pyrex.SlackBuild and submit .mkbuild and .SlackBuild in Slack.Sarava local tree. ${red}mkbuild -a \"Jose Araujo\" -ai \"ja\" -n pyrex${normal} make a basic pyrex.mkbuild with author name \"Jose Araujo\" and @@ -134,18 +134,18 @@ function set_parameters { is_number $BUILD_NUMBER || handle_error "$ERROR_NOT_NUMBER" "--build-number" shift ;; - '-cs'|'--commit-slackbuild') + '-ss'|'--submit-slackbuild') # Commit SlackBuild file - COMMIT_SLACKBUILD=$on + SUBMIT_SLACKBUILD=$on ;; - '-cm'|'--commit-mkbuild') - # commit mkbuild file - COMMIT_MKBUILD=$on + '-sm'|'--submit-mkbuild') + # submit mkbuild file + SUBMIT_MKBUILD=$on ;; - '-c'|'--commit-all') + '-sa'|'--submit-all') # Commit SlackBuild and mkbuild file - COMMIT_SLACKBUILD=$on - COMMIT_MKBUILD=$on + SUBMIT_SLACKBUILD=$on + SUBMIT_MKBUILD=$on ;; '-n'|'--new') # New mkbuild configure file @@ -539,11 +539,11 @@ function apply_mkpatch { # ---------------------------------------------------------------- # ------------------- svn functions ------------------------------ -function commit_slackbuild { +function submit_slackbuild { # Commit SlackBuild in local Slack.Sarava tree if [ $UID -ne 0 ]; then - echo "Only root can commit SlackBuilds..." + echo "Only root can submit SlackBuilds..." return 1 fi echo -e "\nCommit $SLACKBUILD" @@ -572,11 +572,11 @@ function commit_slackbuild { } -function commit_mkbuild { +function submit_mkbuild { # Commit mkbuild in local mkbuild Slack.Sarava tree if [ $UID -ne 0 ]; then - echo "Only root can commit mkbuild..." + echo "Only root can submit mkbuild..." return 1 fi echo -e "\nCommit $MKBUILD_NAME" @@ -687,9 +687,9 @@ fi # Start constants set_constants -# Set commit off -COMMIT_SLACKBUILD=$off -COMMIT_MKBUILD=$off +# Set submit off +SUBMIT_SLACKBUILD=$off +SUBMIT_MKBUILD=$off # Set verbose off VERBOSE=$off SVN_MOD=$off @@ -918,10 +918,10 @@ if [ ! -z $MKBUILD_NAME ]; then change_others_parameters # Commit SlackBuild - [ $COMMIT_SLACKBUILD -eq $on ] && commit_slackbuild + [ $SUBMIT_SLACKBUILD -eq $on ] && submit_slackbuild # Commit mkbuild - [ $COMMIT_MKBUILD -eq $on ] && commit_mkbuild + [ $SUBMIT_MKBUILD -eq $on ] && submit_mkbuild ;; 'search') SEARCH=`find $MKBUILDS_DIR -iname $MKBUILD_NAME` |