generic printfiles

This commit is contained in:
Joe Shochet 2003-10-01 20:49:03 +00:00
parent e2557e2204
commit 81569a2513
2 changed files with 18 additions and 10 deletions

View File

@ -1,3 +1,3 @@
// Install scripts for building zipfiles (leveleditor and RobotToonManager) // Install scripts for building zipfiles (leveleditor and RobotToonManager)
#define INSTALL_SCRIPTS printdir printlib copyfiles #define INSTALL_SCRIPTS printdir printlib copyfiles zipfiles

View File

@ -2,32 +2,40 @@
if [ "$1" = "-d" ] if [ "$1" = "-d" ]
then then
#destdir=$2 destdir=$2
destdir="levelEditor" zipfile=$3
zipfile="levelEditor.zip"
debug_state="-d" debug_state="-d"
else else
#destdir=$1 destdir=$1
destdir="levelEditor" zipfile=$2
zipfile="levelEditor.zip"
debug_state="" debug_state=""
fi fi
if [ "${destdir}" = "" ] if [ "${destdir}" = "" ]
then then
echo "Usage: zipfiles [-d]" echo "Usage: zipfiles [-d] destdir destfile.zip"
exit 1 exit 1
fi fi
if [ -d ${destdir} ] if [ -d ${destdir} ]
then then
echo "Removing ${destdir}" echo "Removing ${destdir}"
rm -rf ${destdir} echo "ERROR: destdir must not already exist"
exit 1
fi
if [ -f ${zipfile} ]
then
echo "Found printfiles"
else
echo "Cannot find printfiles script. Run zipfiles in the same directory as printfiles"
exit 1
fi fi
if mkdir ${destdir} if mkdir ${destdir}
then then
if copyfiles ${debug_state} ${destdir} printfiles echo "Created destdir"
if copyfiles ${debug_state} ${destdir} ./printfiles
then then
if [ -f ${zipfile} ] if [ -f ${zipfile} ]
then then