From 667a476adeae105dd8b712a14d4e136f58e5810d Mon Sep 17 00:00:00 2001
From: Raymond Toy <toy.raymond@gmail.com>
Date: Sun, 6 Nov 2011 19:13:00 -0800
Subject: [PATCH] Don't add .git directory to src tarball!  If compression or
 version is not given, use some reasonable default so we don't end up with a
 weird tarball.

---
 bin/make-src-dist.sh | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/bin/make-src-dist.sh b/bin/make-src-dist.sh
index f19dae235..a65aad831 100755
--- a/bin/make-src-dist.sh
+++ b/bin/make-src-dist.sh
@@ -25,7 +25,18 @@ done
 
 shift `expr $OPTIND - 1`
 
-VERSION=$1
+# If no compression given, default to gzip (on the assumption that
+# that is available everywhere.)
+if [ -z "$ENABLE_BZIP" -a -z "$ENABLE_GZIP" ]; then
+    ENABLE_GZIP=-b
+fi
+
+# If no version is given, default to today's date
+if [ -n "$1" ]; then
+    VERSION=$1
+else
+    VERSION="`date '+%Y-%m-%d-%H:%M:%S'`"
+fi
 
 echo Creating source distribution
 if [ -n "$ENABLE_GZIP" ]; then
@@ -37,7 +48,7 @@ if [ -n "$ENABLE_BZIP" ]; then
     ZIPEXT="bz2"
 fi
 
-GTAR_OPTIONS="--exclude=CVS --exclude='*.pot.~*~'"
+GTAR_OPTIONS="--exclude=.git --exclude='*.pot.~*~'"
 if [ -z "$INSTALL_DIR" ]; then
     echo "  Compressing with $ZIP"
     ${GTAR:-tar} ${GTAR_OPTIONS} -cf - src | ${ZIP} > cmucl-src-$VERSION.tar.$ZIPEXT
-- 
GitLab