Commit 3d9b078d authored by rtoy's avatar rtoy
Browse files

tools/make-dist.sh:

o Add -S option to create a source tarball.  Call make-src-dist.sh to
  create the tarball.  If "tar" is not GNU tar, set the environment
  variable GTAR to point to GNU tar.

tools/make-src-dist.sh:
o Create a tarball of the src directory, removing any CVS
  directories.  This requires GNU tar.
parent 3bf46438
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -7,6 +7,8 @@ usage() {
    echo "  -g           Use gzip compression"
    echo "  -G group     Group to use"
    echo "  -O owner     Owner to use"
    echo "  -S           Create a source distribution (requires GNU tar)"
    echo "                 The compressed tar file is named cmucl-src-<VERSION>.tar.<ext>"
    echo "   dir         Directory where the build is located"
    echo "   version     Version (usually date and/or other version info)"
    echo "   arch        Architecture (x86, sparc, etc.)"
@@ -24,13 +26,14 @@ usage() {
    exit 1
}

while getopts "G:O:bgh?" arg
while getopts "G:O:bghS?" arg
do
    case $arg in
	G) GROUP=$OPTARG ;;
	O) OWNER=$OPTARG ;;
	b) ENABLE_BZIP=-b ;;
	g) ENABLE_GZIP=-g  ;;
        S) MAKE_SRC_DIST=yes ;;
	h | \?) usage; exit 1 ;;
    esac
done
@@ -103,3 +106,9 @@ OPTIONS="${GROUP:+ -G ${GROUP}} ${OWNER:+ -O ${OWNER}} $ENABLE_GZIP $ENABLE_BZIP
echo Creating distribution for $ARCH $OS
$ROOT/make-main-dist.sh $OPTIONS $TARGET $VERSION $ARCH $OS || exit 1
$ROOT/make-extra-dist.sh $OPTIONS $TARGET $VERSION $ARCH $OS || exit 2

if [ X"$MAKE_SRC_DIST" = "Xyes" ]; then
    # If tar is not GNU tar, set the environment variable GTAR to
    # point to GNU tar.
    $ROOT/make-src-dist.sh $ENABLE_GZIP $ENABLE_BZIP -t ${GTAR:-tar} $VERSION
fi

tools/make-src-dist.sh

0 → 100755
+28 −0
Original line number Diff line number Diff line
#!/bin/sh

while getopts "bgh?t:" arg
do
    case $arg in
	b) ENABLE_BZIP=-b ;;
	g) ENABLE_GZIP=-g  ;;
        t) GTAR=$OPTARG ;;
	h | \?) usage; exit 1 ;;
    esac
done

shift `expr $OPTIND - 1`

VERSION=$1

echo Creating source distribution
if [ -n "$ENABLE_GZIP" ]; then
    ZIP="gzip -c"
    ZIPEXT="gz"
fi
if [ -n "$ENABLE_BZIP" ]; then
    ZIP="bzip2"
    ZIPEXT="bz2"
fi

echo "  Compressing with $ZIP"
${GTAR:-tar} --exclude=CVS -cf - src | ${ZIP} > cmucl-src-$VERSION.tar.$ZIPEXT