1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
#!/bin/sh
# Author: hoijui
# absolute or relative to spring source root
# default:
BUILD_DIR=game/base
# ... or use first argument to this script, if one was given
if [ $# -ge 1 ]
then
BUILD_DIR=${1}
fi
if [ $# -ge 2 ]
then
EXEC_7Z=${2}
else
EXEC_7Z=7z
fi
# Sanity check.
if ! which ${EXEC_7Z} > /dev/null; then
echo "Error: Could not find 7z."
exit 1
fi
CMD_7Z="${EXEC_7Z} u -tzip -r"
ORIG_DIR=$(pwd)
# Move to spring source root (eg containing dir 'installer')
cd $(dirname $0); cd ..
# Ensure directories exist (some VCSes do not support empty directories)
mkdir -p ${BUILD_DIR}/spring
# make the install dir absolute, if it is not yet
BUILD_DIR=$(cd $BUILD_DIR; pwd)
# Zip up the stuff.
cd installer/builddata/
echo Updating bitmaps.sdz
cd bitmaps/
${CMD_7Z} ${BUILD_DIR}/spring/bitmaps.sdz * > /dev/null
cd ..
echo Updating springcontent.sdz
cd springcontent/
${CMD_7Z} ${BUILD_DIR}/springcontent.sdz * > /dev/null
cd ..
echo Updating maphelper.sdz
cd maphelper/
${CMD_7Z} ${BUILD_DIR}/maphelper.sdz * > /dev/null
cd ..
echo Updating cursors.sdz
cd cursors/
${CMD_7Z} ${BUILD_DIR}/cursors.sdz * > /dev/null
cd ..
cd ../..
cd ${ORIG_DIR}
|