]> Zhao Yanbai Git Server - minix.git/commitdiff
release.sh: Support preinstalled package selection 64/2964/1
authorLionel Sambuc <lionel@minix3.org>
Thu, 19 Mar 2015 11:39:00 +0000 (12:39 +0100)
committerLionel Sambuc <lionel@minix3.org>
Fri, 20 Mar 2015 10:17:24 +0000 (11:17 +0100)
This allows to both override the default package repository and
preinstalled packages list from the command line or the environment.

Also use everywhere PACKAGEURL.

Change-Id: I3434ff53be769f8d0f890bb5fb44521a0017e123

releasetools/release.sh

index 38343ce3eddf73c3da679c26c3758ea6a5bbdd30..9b3e4b59d16960b858933bb68dab8f77224c6945 100755 (executable)
@@ -13,6 +13,10 @@ SRC=src
 : ${GITBRANCH:=master}
 : ${BUILDOPTIONS:=}
 
+# Packages we have to pre-install, and url to use
+: ${PACKAGEURL="http://www.minix3.org/pkgsrc/packages/$version_pretty/`uname -m`/All/"}
+: ${PREINSTALLED_PACKAGES:="pkg_install pkgin"}
+
 # List of packages included on installation media
 PACKAGELIST=packages.install
 secs=`expr 32 '*' 64`
@@ -26,15 +30,6 @@ then echo Please install pkg_install from pkgsrc.
        exit 1
 fi
 
-# Packages we have to pre-install, and url to use
-PACKAGEURL=http://www.minix3.org/pkgsrc/packages/$version_pretty/`uname -m`/All/
-PREINSTALLED_PACKAGES="
-       pkg_install
-       pkgin
-       "
-
-PKG_ADD_URL=$PACKAGEURL
-
 RELEASERC=$HOME/.releaserc
 
 if [ -f $RELEASERC ]
@@ -100,9 +95,9 @@ do
                ;;
        M)      MAKEMAP=1
                ;;
-       l)      PKG_ADD_URL=file://$PACKAGEDIR/All
+       l)      PACKAGEURL=file://$PACKAGEDIR/All
                ;;
-       L)      PKG_ADD_URL="$OPTARG"
+       L)      PACKAGEURL="$OPTARG"
                CUSTOM_PACKAGES=1
                ;;
        e)      EXTRAS_INSTALL=1
@@ -203,12 +198,12 @@ date >$RELEASEDIR/CD
 rm -f $RELEASEDIR/usr/$SRC/releasetools/revision
 
 for p in $PREINSTALLED_PACKAGES
-do     echo " * Pre-installing: $p from $PKG_ADD_URL"
-    $PKG_ADD -f -P $RELEASEDIR $PKG_ADD_URL/$p
+do     echo " * Pre-installing: $p from $PACKAGEURL"
+    $PKG_ADD -f -P $RELEASEDIR $PACKAGEURL/$p
 done
 
 if [ "$CUSTOM_PACKAGES" ]
-then   echo $PKG_ADD_URL >$RELEASEDIR/usr/pkg/etc/pkgin/repositories.conf
+then   echo $PACKAGEURL >$RELEASEDIR/usr/pkg/etc/pkgin/repositories.conf
 fi
 
 echo " * Resetting timestamps"