From 3e3ff73e529b3f67cf5d890ea679dda42dca59ba Mon Sep 17 00:00:00 2001 From: ehouse Date: Sat, 11 Oct 2008 22:59:18 +0000 Subject: [PATCH] first cut at script to produce zipfile and readme --- xwords4/wince/scripts/makezip.sh | 85 ++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100755 xwords4/wince/scripts/makezip.sh diff --git a/xwords4/wince/scripts/makezip.sh b/xwords4/wince/scripts/makezip.sh new file mode 100755 index 000000000..19e40fe4d --- /dev/null +++ b/xwords4/wince/scripts/makezip.sh @@ -0,0 +1,85 @@ +#!/bin/sh + +DICT=../dawg/English/BasEnglish2to8.xwd +TMPDIR=/tmp/_$$ +README=$TMPDIR/README.txt + +function usage() { + echo "usage: $0 --exe exe_file " + echo " [--name exe_name_to_use]" + echo " [--dict dict_to_include]" + echo " [--out zipfile_to_produce]" + exit 0 +} + +while :; do + case "$1" in + --exe) + [ -z $2 ] && usage + EXE=$2 + shift 2 + ;; + --name) + [ -z $2 ] && usage + NAME=$2 + shift 2 + ;; + --dict) + [ -z $2 ] && usage + DICT=$2 + shift 2 + ;; + --out) + [ -z $2 ] && usage + OUTFILE=$2 + shift 2 + ;; + "") + break + ;; + *) + usage + esac +done + +[ -z "$EXE" ] && usage +[ -z "$OUTFILE" ] && OUTFILE=${NAME%.exe}.zip + +mkdir -p $TMPDIR + +# If name's specified, we need to create that file. Do it before +# catting text below so EXE will be correct + +if [ ! -z "$NAME" ]; then + NAME=$TMPDIR/$NAME + echo "copying $EXE to $NAME" + cp $EXE $NAME + EXE=$NAME +fi + +cat > $README <