]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
small fixes
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Wed, 3 Oct 2007 05:12:15 +0000 (05:12 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Wed, 3 Oct 2007 05:12:15 +0000 (05:12 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@444 04377dda-e619-0410-9926-eae83683ac58

trunk/utils/simpletrack

index d20f7707151076df45d2259003240c317ba0beae..a0749e49f677259bbfc75ce054da35fc136e843d 100755 (executable)
 #  Place - Suite 330, Boston, MA 02111-1307, USA
 #
 
-PRIORITY="slacktrack-real altertrack slacktrack"
+PRIORITY="slacktrack-real slacktrack altertrack"
 BASENAME="`basename $0`"
 
 function slacktrack {
 
-  # TODO: env vars
   $1 -b $REPOS -x $TMP,$SRC_DIR,/dev -jefkzp "$PACKAGE-$VERSION-$ARCH-$BUILD.tgz" "./$2"
 
 }
 
 function slacktrack-real {
 
-  # TODO: env vars
   $1 -b $REPOS -x $TMP,$SRC_DIR,/dev -jefkzp "$PACKAGE-$VERSION-$ARCH-$BUILD.tgz" "./$2"
 
 }
 
 function altertrack {
 
-  # TODO: command line argument and env vars
-  $1 ./$2
+  $1 -b $REPOS -x $TMP,$SRC_DIR,/dev -jefkzp "$PACKAGE-$VERSION-$ARCH-$BUILD.tgz" "./$2"
 
 }
 
@@ -47,16 +44,17 @@ function altertrack {
 if [ -z "$1" ]; then
        echo "usage: $BASENAME [options] <build-script>"
        exit 1
-else if [ ! -f "$1" ]; then
+elif [ ! -f "$1" ]; then
        echo "$1: file not found"
        exit 1
 fi
 
 for tracker in $PRIORITY; do
-       path=`which $tracker`
+       path="`which $tracker 2> /dev/null`"
        if [ "$?" == "0" ]; then
                echo $BASENAME: using $tracker...
                $tracker $path $*
+               break
        fi
 done