]> git.stg.codes - stg.git/blob - projects/make_tarball/make.sh
534885c9bbf4a8f530cd7991d5257024d7a10c7f
[stg.git] / projects / make_tarball / make.sh
1 #!/bin/sh
2
3 if [ "$1" != "" ]
4 then
5     SRC_DIR="$1"
6 else
7     PREFIX="stg-2.4"
8     SRC_DIR=$(date "+${PREFIX}-%Y.%m.%d-%H.%M.%S")
9 fi
10
11 ARC_NAME=$SRC_DIR.tar.gz
12
13 git clone git@stg.codes:stg.git -b stg-2.409 $SRC_DIR
14
15 if [ $? != 0 ]
16 then
17     echo "Failed to clone repository"
18     exit -1
19 fi
20
21 rm -rf $SRC_DIR/.git
22 rm -f $SRC_DIR/.gitignore
23 rm -r $SRC_DIR/projects/make_tarball
24 rm -r $SRC_DIR/projects/sgauthstress
25 rm -r $SRC_DIR/projects/rlm_stg
26 rm -r $SRC_DIR/projects/stargazer/plugins/authorization/stress
27 rm $SRC_DIR/doc/help.odt
28
29 tar -zcf $ARC_NAME $SRC_DIR