]> Zhao Yanbai Git Server - minix.git/commitdiff
Add option to script to make releases from cvs tags/branches.
authorBen Gras <ben@minix3.org>
Thu, 29 Sep 2005 13:03:42 +0000 (13:03 +0000)
committerBen Gras <ben@minix3.org>
Thu, 29 Sep 2005 13:03:42 +0000 (13:03 +0000)
tools/release.sh

index 3bfbe6a65e00be3bd2dc696cfb50eb28f3fc8365..07601f3397f5c46d63cc54a0235fd88c625be49a 100755 (executable)
@@ -66,12 +66,13 @@ BS=4096
 
 HDEMU=0
 COPY=0
+CVSTAG=HEAD
 
-while getopts "chaq?" c
+while getopts "ch?" c
 do
        case "$c" in
        \?)
-               echo "Usage: $0 [-a] [-c] [-h]" >&2
+               echo "Usage: $0 [-c] [-h] [-r <tag>]" >&2
                exit 1
        ;;
        h)
@@ -83,6 +84,9 @@ do
                echo " * Copying, not CVS"
                COPY=1
                ;;
+       r)      
+               CVSTAG=$OPTARG
+               ;;
        esac
 done
 
@@ -167,7 +171,7 @@ chmod -R u+w $RELEASEDIR/usr/lib
 if [ "$COPY" -ne 1 ]
 then
        echo " * Doing new cvs export"
-       ( cd $RELEASEDIR/usr && mkdir src && cvs export -rHEAD src )
+       ( cd $RELEASEDIR/usr && mkdir src && cvs export -r$CVSTAG src )
 else
        ( cd .. && make clean )
        srcdir=/usr/src