scyther/dist/makedist.sh

83 lines
1.8 KiB
Bash
Raw Normal View History

#!/bin/sh
#------------------------------------------------------------------------------
#
# makedist.sh
#
# Make a Scyther distribution of the most recent revision.
#
#
# A distribution is a directory
#
# scyther/
2006-08-11 19:04:36 +01:00
# - everything from ../gui
# SPORE/
# - spore files
#
#------------------------------------------------------------------------------
#
# Parameters
# Creates a temporary subdirectory here.
TMPDIR=/tmp/scytherdist
WORKNAME=scyther
# Repository
2006-12-11 10:12:03 +00:00
PROTROOT=https://svn.win.tue.nl/repos/scyther/trunk/spdl
2006-08-11 19:04:36 +01:00
SVNROOT=https://svn.win.tue.nl/repos/scyther/trunk
2006-12-11 10:12:03 +00:00
DOCROOT=https://svn.win.tue.nl/repos/scyther/trunk/manual
2006-08-14 11:01:52 +01:00
MANUAL=scyther-manual.pdf
#------------------------------------------------------------------------------
#
# Derived things
WORKDIR=$TMPDIR/$WORKNAME
CURDIR=$PWD
2006-08-14 11:01:52 +01:00
DOCDEST=$WORKDIR/doc
#------------------------------------------------------------------------------
#
# Init
# Remove old remnants and create a new directory
rm -f $DEST
2006-08-11 19:04:36 +01:00
rm -f $ZIPDEST
rm -rf $TMPDIR
mkdir $TMPDIR
#------------------------------------------------------------------------------
#
# Collect required data and set up
# Fill
2006-08-11 19:04:36 +01:00
svn export $SVNROOT/gui $WORKDIR
svn export $PROTROOT/SPORE $WORKDIR/SPORE
2006-08-14 11:01:52 +01:00
svn cat $DOCROOT/$MANUAL >$WORKDIR/$MANUAL
#------------------------------------------------------------------------------
#
# Collected all needed data, finish up
2007-05-03 16:52:51 +01:00
TAGVERSION=`awk 'BEGIN { FS="\""; } { print $2; }' ../gui/Gui/Version.py`
RELEASE="scyther-$TAGVERSION"
ARCHIVE="$RELEASE.tgz"
ZIPPED="$RELEASE.zip"
DEST=$PWD/$ARCHIVE
ZIPDEST=$PWD/$ZIPPED
# Compress
cd $TMPDIR
tar zcvf $DEST $WORKNAME
2006-08-11 19:04:36 +01:00
zip -r $ZIPDEST $WORKNAME
# Remove garbage
rm -rf $TMPDIR
#------------------------------------------------------------------------------
# Done.