From: Ari Johnson Date: Sat, 3 Mar 2007 04:03:42 +0000 (+0000) Subject: Moved distribution scripts into utils directory X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=f33577f52397536cbeb688212aebd7b5b5e80a4a;p=cobramush.git Moved distribution scripts into utils directory (cherry picked from commit f1e8e636f7195ab17d0a74dac8e57fa0c5a87d9e) --- diff --git a/scripts/.gitify-empty b/scripts/.gitify-empty deleted file mode 100644 index e69de29..0000000 diff --git a/scripts/makedist.sh b/scripts/makedist.sh deleted file mode 100644 index e0a7553..0000000 --- a/scripts/makedist.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh - -SELF=`which "$0"` -DIR=`dirname "$SELF"` -cd "$DIR" -cd .. - -# 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/'` -BRANCH=`grep VBRANCH hdrs/version.h | sed 's/^.*"\(.*\)".*$/\1/'` -echo "Version is $VERSION, branch is $BRANCH" - -# 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..." -if [ "$BRANCH" = "release" ]; then - BRANCHNAME="" -else - BRANCHNAME="-$BRANCH" -fi -TARBALL="cobramush-$VERSION$BRANCHNAME.tar.gz" -tar -czf "$WD/$TARBALL" cobramush - -# Step 5: clean up -echo "Cleaning up..." -cd "$WD" -rm -r "$TMPDIR" - -echo "$TARBALL created" - diff --git a/scripts/preparedist.sh b/scripts/preparedist.sh deleted file mode 100644 index 8a109c8..0000000 --- a/scripts/preparedist.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -SELF=`which "$0"` -DIR=`dirname "$SELF"` -cd "$DIR" -cd .. - -# Step 1: run metaconfig -echo "Running metaconfig to generate Configure and config_h.SH..." -metaconfig -M - -# Step 2: generate changes.txt -echo "Generating changes.txt..." -( cd game/txt && ruby genchanges.rb ) - -# Step 3: index help files -echo "Indexing help, news, and events..." -cd game/txt -for i in hlp nws evt ; do - cd $i - rm -f index.$i - cat *.$i | perl ../index-files.pl > index.$i - cd .. -done - -cd ../.. - diff --git a/utils/makedist.sh b/utils/makedist.sh new file mode 100644 index 0000000..e0a7553 --- /dev/null +++ b/utils/makedist.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +SELF=`which "$0"` +DIR=`dirname "$SELF"` +cd "$DIR" +cd .. + +# 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/'` +BRANCH=`grep VBRANCH hdrs/version.h | sed 's/^.*"\(.*\)".*$/\1/'` +echo "Version is $VERSION, branch is $BRANCH" + +# 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..." +if [ "$BRANCH" = "release" ]; then + BRANCHNAME="" +else + BRANCHNAME="-$BRANCH" +fi +TARBALL="cobramush-$VERSION$BRANCHNAME.tar.gz" +tar -czf "$WD/$TARBALL" cobramush + +# Step 5: clean up +echo "Cleaning up..." +cd "$WD" +rm -r "$TMPDIR" + +echo "$TARBALL created" + diff --git a/utils/preparedist.sh b/utils/preparedist.sh new file mode 100644 index 0000000..8a109c8 --- /dev/null +++ b/utils/preparedist.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +SELF=`which "$0"` +DIR=`dirname "$SELF"` +cd "$DIR" +cd .. + +# Step 1: run metaconfig +echo "Running metaconfig to generate Configure and config_h.SH..." +metaconfig -M + +# Step 2: generate changes.txt +echo "Generating changes.txt..." +( cd game/txt && ruby genchanges.rb ) + +# Step 3: index help files +echo "Indexing help, news, and events..." +cd game/txt +for i in hlp nws evt ; do + cd $i + rm -f index.$i + cat *.$i | perl ../index-files.pl > index.$i + cd .. +done + +cd ../.. +