Debian Codegraph @

scripts/pkg_src

raw symbols SCIP
1 #!/bin/sh
2
3 if [ $# -ne 0 ]; then
4 echo "Simple packaging file for the source."
5 echo ""
6 echo "Use in the root directory of the game, like so:"
7 echo " scripts/pkg_src"
8 echo "The script will output a tarball angband-[git describe].tar.gz"
9
10 exit 1
11 fi
12
13 TAG=angband-`git describe`
14 OUT=$TAG.tar.gz
15
16 # Error checking
17 if [ -e $OUT ]; then
18 cat <<EOF
19 The output file $OUT already exists.
20 Please rename or delete it before running the script again.
21 EOF
22 exit 1
23 fi
24
25 if [ -e $TAG ]; then
26 cat <<EOF
27 The output directory $TAG already exists.
28 Please rename or delete it before running the script again.
29 EOF
30 exit 1
31 fi
32
33 git checkout-index --prefix=$TAG/ -a &&
34 git describe > $TAG/version &&
35 cd $TAG &&
36 ./autogen.sh &&
37 rm -rf autogen.sh autom4te.cache &&
38 cd .. &&
39 tar --exclude .gitignore --exclude *.dll -czvf $OUT $TAG &&
40 rm -rf $TAG