aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--trunk/lib/common.sh27
-rw-r--r--trunk/src/createpkg27
-rwxr-xr-xtrunk/src/mkbuild34
3 files changed, 54 insertions, 34 deletions
diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh
index 15bad2f..f1635e4 100644
--- a/trunk/lib/common.sh
+++ b/trunk/lib/common.sh
@@ -700,6 +700,33 @@ function svn_remove_empty_folders {
}
+function commit_changes {
+
+ # usage: commit_changes <path>
+
+ local repos="$1" tmpfile
+ shift
+
+ if [ -d "$repos/.svn" ]; then
+ cwd="`pwd`"
+ chown_svn $repos && chgrp_svn $repos
+ cd $repos
+ if [ ! -z "$1" ]; then
+ if tmpfile=`mktemp -t simplepkg_commit.XXXXXX`; then
+ echo $* > $tmpfile
+ su_svn commit -F $tmpfile
+ rm -f $tmpfile
+ else
+ su_svn commit
+ fi
+ else
+ su_svn commit
+ fi
+ cd $cwd
+ fi
+
+}
+
# -----------------------------------------------
# update jail functions
# -----------------------------------------------
diff --git a/trunk/src/createpkg b/trunk/src/createpkg
index 296a5fa..41d860e 100644
--- a/trunk/src/createpkg
+++ b/trunk/src/createpkg
@@ -298,33 +298,6 @@ function repository_status {
}
-function commit_changes {
-
- # usage: commit_changes <repository_path>
-
- local repos="$1" tmpfile
- shift
-
- if [ -d "$repos/.svn" ]; then
- cwd="`pwd`"
- chown_svn $repos && chgrp_svn $repos
- cd $repos
- if [ ! -z "$1" ]; then
- if tmpfile=`mktemp -t createpkg_commit.XXXXXX`; then
- echo $* > $tmpfile
- su_svn commit -F $tmpfile
- rm -f $tmpfile
- else
- su_svn commit
- fi
- else
- su_svn commit
- fi
- cd $cwd
- fi
-
-}
-
function create_repo_folder {
# Create repository directory
diff --git a/trunk/src/mkbuild b/trunk/src/mkbuild
index afb8571..d15af0f 100755
--- a/trunk/src/mkbuild
+++ b/trunk/src/mkbuild
@@ -15,9 +15,7 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place - Suite 330, Boston, MA 02111-1307, USA
#
-#
# Based in model generic.SlackBuild of Luiz
-#
# Version $Rev$ - $Author$
PROG_VERSION="1.2.8"
@@ -76,6 +74,12 @@ ${red}DESCRIPTION${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}-cs${normal}, ${red}--commit-slackbuild${normal}
+ commit SlackBuilds in svn SlackBuild tree
+ ${red}-cm${normal}, ${red}--commit-mkbuild${normal}
+ commit .mkbuild in svn mkbuild tree
+ ${red}-ca${normal}, ${red}--commit-all${normal}
+ commit SlackBuild and .mkbuild files in svn tree
${red}-h${normal}, ${red}--help${normal}
this help mesage
${red}-n${normal}, ${red}--new${normal} ${green}<mkbuild_name>${normal}
@@ -136,18 +140,34 @@ function set_parameters {
shift
;;
'-ss'|'--submit-slackbuild')
- # Commit SlackBuild file
+ # Submit SlackBuild file
SUBMIT_SLACKBUILD=$on
;;
'-sm'|'--submit-mkbuild')
- # submit mkbuild file
+ # Submit mkbuild file
SUBMIT_MKBUILD=$on
;;
'-sa'|'--submit-all')
- # Commit SlackBuild and mkbuild file
+ # Submit SlackBuild and mkbuild file
SUBMIT_SLACKBUILD=$on
SUBMIT_MKBUILD=$on
;;
+ '-cs'|'--commit-slackbuild')
+ # Commit SlackBuild file
+ commit_changes $SLACKBUILDS_DIR
+ exit 0
+ ;;
+ '-cm'|'--commit-mkbuild')
+ # commit mkbuild file
+ commit_changes $MKBUILDS_DIR
+ exit 0
+ ;;
+ '-ca'|'--commit-all')
+ # Commit SlackBuild and mkbuild file
+ commit_changes $SLACKBUILDS_DIR
+ commit_changes $MKBUILDS_DIR
+ exit 0
+ ;;
'-n'|'--new')
# New mkbuild configure file
MKBUILD_NAME="${2//.mkbuild}.mkbuild"
@@ -651,10 +671,10 @@ function decompress_find {
function load_parameters {
# Load Createpkg parameters
- SLACKBUILDS_DIR="`eval_parameter SLACKBUILDS_DIR /var/simplaret/slackbuilds`"
+ SLACKBUILDS_DIR="`eval_parameter SLACKBUILDS_DIR /var/simplepkg/slackbuilds`"
[ ! -d $SLACKBUILDS_DIR ] && mkdir -p $SLACKBUILDS_DIR
- MKBUILDS_DIR="`eval_parameter MKBUILDS_DIR /var/simplaret/mkbuilds`"
+ MKBUILDS_DIR="`eval_parameter MKBUILDS_DIR /var/simplepkg/mkbuilds`"
[ ! -d $SLACKBUILDS_DIR ] && mkdir -p $SLACKBUILDS_DIR
SLACKBUILDS_SVN="`eval_parameter SLACKBUILDS_DIR http://slack.sarava.org/slackbuilds`"