]> Zhao Yanbai Git Server - minix.git/commitdiff
release.sh - let some packages come pre-installed (right now just pkgin)
authorBen Gras <ben@minix3.org>
Thu, 5 Aug 2010 13:56:51 +0000 (13:56 +0000)
committerBen Gras <ben@minix3.org>
Thu, 5 Aug 2010 13:56:51 +0000 (13:56 +0000)
tools/chrootmake.sh
tools/release.sh

index 84c2813ca1857b32cb2d36db30958a638859653d..4f07698e0d564c41617dc17eae89c4c69dd61fcb 100755 (executable)
@@ -2,7 +2,12 @@
 set -e
 export SHELL=/bin/sh
 cd /usr/src 
-make etcfiles
+
+if [ $# -gt 0 ]
+then   make $@
+       exit $?
+fi
+
 make world
 cd tools 
 rm revision
index c86a882497d6efca1145f311b8f9475d2eb8270a..01df3d8eb3d5ae5f73c2c165d9277e59144493ad 100755 (executable)
@@ -17,6 +17,10 @@ PACKAGESOURCELIST=package_sources.install
 secs=`expr 32 '*' 64`
 export SHELL=/bin/sh
 
+# Packages we have to pre-install, and url to use
+PREINSTALLED_PACKAGES=pkgin-0.3.3.1nb1
+PACKAGEURL=ftp://ftp.minix3.org/pub/minix/packages/`uname -r`/`uname -m`/All/
+
 RELEASERC=$HOME/.releaserc
 
 if [ -f $RELEASERC ]
@@ -360,8 +364,19 @@ mkdir -p $RELEASEDIR/usr/share/mk
 chmod 755 $RELEASEDIR/usr/share/mk
 cp $RELEASEDIR/usr/src/share/mk/* $RELEASEDIR/usr/share/mk/
 chown -R root $RELEASEDIR/usr/share/mk
-echo " * Chroot build"
 cp chrootmake.sh $RELEASEDIR/usr/$SRC/tools/chrootmake.sh
+
+echo " * Make hierarchy"
+chroot $RELEASEDIR "PATH=/$XBIN sh -x /usr/$SRC/tools/chrootmake.sh etcfiles" || exit 1
+
+if [ "$COPY" -ne 1 ]
+then   for p in $PREINSTALLED_PACKAGES
+       do      echo " * Pre-installing: $p from $url"
+               pkg_add -P $RELEASEDIR $PACKAGEURL/$p
+       done
+fi
+
+echo " * Chroot build"
 chroot $RELEASEDIR "PATH=/$XBIN MAKEMAP=$MAKEMAP sh -x /usr/$SRC/tools/chrootmake.sh" || exit 1
 # Copy built images for cd booting
 cp $RELEASEDIR/boot/image_big image