]> Zhao Yanbai Git Server - minix.git/commitdiff
release.sh: add -e
authorBen Gras <ben@minix3.org>
Mon, 14 Nov 2011 23:24:37 +0000 (23:24 +0000)
committerBen Gras <ben@minix3.org>
Tue, 15 Nov 2011 13:18:56 +0000 (14:18 +0100)
. allows extra files in release for flexibility
. written by Jan Wieck

tools/release.sh

index 5b7d1e40d61f93e628afeea03bf7bf2b76d767e7..10ed4b941b00a4dc2c46850af9937393dceb3ee1 100755 (executable)
@@ -68,6 +68,8 @@ REVTAG=""
 PACKAGES=1
 MINIMAL=0
 MAKEMAP=0
+EXTRAS_INSTALL=0
+EXTRAS_PATH=
 
 # Do we have git?
 if git --version >/dev/null
@@ -79,11 +81,11 @@ fi
 
 FILENAMEOUT=""
 
-while getopts "j:ls:pmMchu?r:f:L:" c
+while getopts "j:ls:pmMchu?r:f:L:e:" c
 do
        case "$c" in
        \?)
-               echo "Usage: $0 [-l] [-p] [-c] [-h] [-m] [-M] [-r <tag>] [-u] [-f <filename>] [-s <username>] -j<jaildir> [-L <packageurl>]" >&2
+               echo "Usage: $0 [-l] [-p] [-c] [-h] [-m] [-M] [-r <tag>] [-u] [-f <filename>] [-s <username>] -j<jaildir> [-L <packageurl>] [-e <extras-path>]" >&2
                exit 1
        ;;
        h)
@@ -126,6 +128,9 @@ do
        L)      PKG_ADD_URL="$OPTARG"
                CUSTOM_PACKAGES=1
                ;;
+       e)      EXTRAS_INSTALL=1
+               EXTRAS_PATH="$OPTARG"
+               ;;
        esac
 done
 
@@ -295,6 +300,11 @@ then
        ln $RELEASEDIR/boot/image_big $RELEASEDIR/boot/image/$version
 fi
 
+if [ $EXTRAS_INSTALL -ne 0 ] ; then
+    echo " * Copying files from $EXTRAS_PATH"
+    cp -Rv $EXTRAS_PATH/* $RELEASEDIR
+fi
+
 # If we are making a jail, all is done!
 if [ $JAILMODE = 1 ]
 then   echo "Created new minix install in $RELEASEDIR."