From cdfe734b5b7552d82469bd415287431b69308922 Mon Sep 17 00:00:00 2001 From: rudson Date: Sun, 17 Jun 2007 03:56:04 +0000 Subject: mkbuild-0.9.7: mais correções. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@392 04377dda-e619-0410-9926-eae83683ac58 --- branches/0.6/src/mkbuild | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'branches/0.6/src/mkbuild') 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 #============================= -- cgit v1.2.3