aboutsummaryrefslogtreecommitdiff
path: root/branches/0.6/src/mkbuild
diff options
context:
space:
mode:
Diffstat (limited to 'branches/0.6/src/mkbuild')
-rwxr-xr-xbranches/0.6/src/mkbuild21
1 files changed, 18 insertions, 3 deletions
diff --git a/branches/0.6/src/mkbuild b/branches/0.6/src/mkbuild
index be5a801..200e2b1 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.6
-PROG_VERSION=0.9.6
+# Version 0.9.7
+PROG_VERSION=0.9.7
#--------------------------------------------------------------------
# Functions
@@ -276,6 +276,7 @@ function start_build {
edit_file "DECOMPRESSOR TEST FLAG" "$DECOMPRESSOR_TEST_FLAG" $1
edit_file "PROGRAM URL" "$URL" $1
edit_file "ARCH" "$ARCH" $1
+ [ `is_number $NUMJOBS` ] && NUMJOBS="-j${NUMJOBS}"
edit_file "NUMBER OF JOBS" "$NUMJOBS" $1
edit_file "VERSION" $VERSION $1
edit_file "SOURCE NAME CONSTRUCTION STRING" "$CONST_STRING" $1
@@ -429,6 +430,8 @@ function commit_slackbuild {
SLACKBUILD_PATH="`dirname $AUX | tr - /`/`basename $AUX`"
+ # check SlackBuilds directory
+ [ ! -e $SLACKBUILDS_DIR ] && createpkg --sync
# change to SlackBuilds directory
cd $SLACKBUILDS_DIR/
@@ -440,7 +443,7 @@ function commit_slackbuild {
# check slack-required
# add slack-required
- svn_add slack-required $SLACKBUILD_PATH
+ [ -e $WORK/slack-required ] && svn_add slack-required $SLACKBUILD_PATH
cd $WORK
}
@@ -476,6 +479,18 @@ function svn_add {
fi
}
+function is_number()
+{
+ local -i int
+ if [ $# -eq 0 ]
+ then
+ return 1
+ else
+ (let int=$1) 2>/dev/null
+ return $? # Exit status of the let thread
+ fi
+}
+
#=============================
# Main Program
#=============================