From: Ari Johnson Date: Fri, 2 Mar 2007 16:19:55 +0000 (+0000) Subject: makedist.sh improvements X-Git-Tag: 0.73~92 X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=355de9ef702f5059c29af87213866d85fd79289d;p=cobramush.git makedist.sh improvements --- diff --git a/scripts/makedist.sh b/scripts/makedist.sh index ed0e85c..97957cf 100644 --- a/scripts/makedist.sh +++ b/scripts/makedist.sh @@ -5,19 +5,38 @@ DIR=`dirname "$SELF"` cd "$DIR" cd .. -# Step 1: make it distribution-ready -echo "Preparing distribution..." -. ./scripts/preparedist.sh +# Step 1: make sure it is distribution-ready +echo "Ensure that you run preparedist.sh before makedist.sh to ensure" +echo "that all files are up-to-date" # Step 2: determine version echo "Determining version..." VERSION=`grep VERSION hdrs/version.h | sed 's/^.*"\(.*\)".*$/\1/'` echo "Version is $VERSION" -# Step 3: make tarball +# Step 3: copy everything into a temporary directory +WD=`pwd` +TMPDIR=`mktemp -d "cobramush.dist.XXXXXX"` +cd "$TMPDIR" +mkdir cobramush +split -l 50 "$WD/MANIFEST" +for i in x?? ; do + for j in `cat $i` ; do + mkdir -p cobramush/`dirname "$j"` + cp "$WD/$j" cobramush/`dirname "$j"` + done +done +rm x?? + +# Step 4: make tarball echo "Making tarball..." TARBALL="cobramush-$VERSION.tar.gz" -tar -czf "$TARBALL" `cat MANIFEST` +tar -czf "$WD/$TARBALL" cobramush + +# Step 5: clean up +echo "Cleaning up..." +cd "$WD" +rm -r "$TMPDIR" -echo "Tarball $TARBALL created" +echo "$TARBALL created"