aboutsummaryrefslogtreecommitdiff
path: root/branches/0.6
diff options
context:
space:
mode:
Diffstat (limited to 'branches/0.6')
-rwxr-xr-xbranches/0.6/src/mkbuild60
1 files changed, 47 insertions, 13 deletions
diff --git a/branches/0.6/src/mkbuild b/branches/0.6/src/mkbuild
index 9e3ba5a..73d0453 100755
--- a/branches/0.6/src/mkbuild
+++ b/branches/0.6/src/mkbuild
@@ -9,8 +9,8 @@
# SlackBuilds são scripts utilizados no Slackware para gerar
# pacotes tgz.
#
-# Version 0.9.4
-PROG_VERSION=0.9.4
+# Version 0.9.5
+PROG_VERSION=0.9.5
#--------------------------------------------------------------------
# Functions
@@ -428,22 +428,53 @@ function commit_slackbuild {
SLACKBUILD_PATH="`dirname $AUX | tr - /`/`basename $AUX`"
- if [ -e $SLACKBUILDS_DIR/$SLACKBUILD_PATH/$SLACKBUILD ]; then
- echo "$SLACKBUILD_PATH/$SLACKBUILD exist!"
- else
- cp $SLACKBUILD $SLACKBUILDS_DIR/$SLACKBUILD_PATH/
- echo "copy $SLACKBUILD to $SLACKBUILDS_DIR/$SLACKBUILD_PATH/"
- fi
+ # change to SlackBuilds directory
+ cd $SLACKBUILDS_DIR/
+
+ # Add SlackBuild scripts
+ # check path
+ [ ! -e $SLACKBUILD_PATH ] && svn_mkdir $SLACKBUILD_PATH
+ # add SlackBuild
+ svn_add $SLACKBUILD $SLACKBUILD_PATH
+
+ # check slack-required
+ # add slack-required
+ svn_add slack-required $SLACKBUILD_PATH
+
+ cd $WORK
+}
+
+function svn_mkdir {
+
+ # svn make directory
+ [ $# -ne 1 ] && mkbuild_error 0
- if [ -e $SLACKBUILDS_DIR/$SLACKBUILD_PATH/slack-required ]; then
- echo "$SLACKBUILD_PATH/slack-required exist!"
+ echo "svn_mkdir $1 $2"
+ DIR_LIST=`echo $1 | tr '/' ' '`
+
+ DIR=""
+ for i in $DIR_LIST; do
+ DIR=$DIR/$i
+ [ ! -e ${DIR:1} ] && svn mkdir ${DIR:1}
+ done
+}
+
+function svn_add {
+
+ # svn add file
+ [ $# -ne 2 ] && mkbuild_error 0
+
+ # copy file
+ if [ -e $2/$1 ]; then
+ echo "$2/$1 exist. Overwriter it."
+ cp $WORK/$1 $2/
else
- cp slack-required $SLACKBUILDS_DIR/$SLACKBUILD_PATH/
- echo "copy slack-required to $SLACKBUILDS_DIR/$SLACKBUILD_PATH/"
+ cp $WORK/$1 $2/
+ # add file to svn tree
+ svn add $2/$1
fi
}
-
#=============================
# Main Program
#=============================
@@ -451,6 +482,9 @@ function commit_slackbuild {
# Common functions
COMMON="/usr/libexec/simplepkg/common.sh"
SIMPLEPKG_CONF="/etc/simplepkg/simplepkg.conf"
+WORK=`pwd`
+LANG=en_US
+COMMIT=0
if [ -f "$COMMON" ]; then
source $COMMON