diff options
author | rudson <rudson@04377dda-e619-0410-9926-eae83683ac58> | 2007-06-17 03:56:04 +0000 |
---|---|---|
committer | rudson <rudson@04377dda-e619-0410-9926-eae83683ac58> | 2007-06-17 03:56:04 +0000 |
commit | cdfe734b5b7552d82469bd415287431b69308922 (patch) | |
tree | 5e74679ab7e869a8738c2d5f4b91c165761339c5 /branches | |
parent | 8e54d2e46507e70210cd0d46eb275cd4829e36f6 (diff) | |
download | simplepkg-cdfe734b5b7552d82469bd415287431b69308922.tar.gz simplepkg-cdfe734b5b7552d82469bd415287431b69308922.tar.bz2 |
mkbuild-0.9.7: mais correções.
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@392 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'branches')
-rwxr-xr-x | branches/0.6/src/mkbuild | 21 |
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 #============================= |