root/tags/release-0.6.2/scripts/release.sh

Revision 8, 0.7 kB (checked in by mjoc, 2 years ago)

Easy releasing script added. Small modifications.

  • Property svn:executable set to *
Line 
1 #!/bin/sh
2
3 #
4 # Easy releasy script. Use before releasing software.
5 #
6
7 NAME=$1
8 INDIR=$2
9 OUTDIR=$3
10
11 if [[ $NAME == "" ]] || [[ $INDIR == "" ]]; then
12     echo "Usage: $0 <release name> <source dir> <tmp dir>"
13     exit 1;
14 fi
15
16 if [[ $UID != "0" ]]; then
17     echo "You should be root (or modify this script to avoid root :)"
18     exit 1;
19 fi
20
21 rm -rf "$OUTDIR/$NAME*"
22 cp -r "$INDIR" "$OUTDIR/$NAME"
23
24 cd $OUTDIR
25 rm -rf $NAME.zip
26 rm -rf $NAME.tar.gz
27
28 for f in `find "$NAME" -name ".svn"`; do echo Removing "$f" && rm -rf "$f"; done;
29
30 zip -r "$NAME.zip" "$NAME"
31 tar -cf "$NAME.tar" "$NAME"
32 gzip "$NAME.tar"
33
34 echo
35 echo "Release files created. Do not forget to create SVN TAG when tested."
Note: See TracBrowser for help on using the browser.