]> Zhao Yanbai Git Server - minix.git/commitdiff
Easypack and binpackage try build.minix first, in case a package includes
authorBen Gras <ben@minix3.org>
Wed, 22 Mar 2006 15:08:36 +0000 (15:08 +0000)
committerBen Gras <ben@minix3.org>
Wed, 22 Mar 2006 15:08:36 +0000 (15:08 +0000)
build itself.

commands/scripts/binpackage.sh
commands/scripts/easypack.sh

index a32e30f95d3f3b1984884e2bd48d80ae2714a874..4d7eeff0a6117a5e6acf8cc5f6d03a03b37373bf 100644 (file)
@@ -41,12 +41,16 @@ touch $packagestart
 sleep 1
 cd $dir
 
-if [ ! -f build ]
-then   echo "Error: No build script in $dir."
+if [ ! -f build -a ! -f build.minix ]
+then   echo "Error: No build or build.minix script in $dir."
        exit 1
 fi
 
-sh -e build
+if [ -f build.minix ]
+then   sh -e build.minix
+else   sh -e build
+fi
+
 echo " * Building package"
 ( if [ -f $PI ]; then echo $PI; fi; find / -cnewer $packagestart | egrep -v "^($srcdir|/(dev|tmp)|/usr/(tmp|log|adm|run|src)|/etc/utmp|/var/run)" ) | pax -w -d | bzip2 >$tarbz
 rm -f $packagestart $findlist $tarcmd
index d3cd8ee0188bec78ae2eef2aa33c1ddced527dc9..fbe63a9cfc7b2b77060f452db74c6b43237fc1af 100644 (file)
@@ -95,7 +95,13 @@ do # Check to see if it exists. Don't overwrite unless -o given
    # It is now unpacked. Build it
    cd $i
    binsizes big
-   if sh build >>$ORIG_DIR/Log 2>&1
+   if [ -f build.minix ]
+   then        sh build.minix >>$ORIG_DIR/Log 2>&1
+       r=$?
+   else        sh build >>$ORIG_DIR/Log 2>&1
+       r=$?
+   fi
+   if [ $r -eq 0 ] 
       then echo Package $i installed
       else echo Package $i failed to install, see Log
    fi