#!/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 [ -n "$1" ]; do [ -z "$2" ] && usage case "$1" in --exe) EXE="$2" ;; --name) NAME="$2" ;; --dict) DICT="$2" ;; --out) OUTFILE="$2" ;; *) usage esac shift 2 done [ -z "$EXE" ] && usage [ -z "$OUTFILE" ] && OUTFILE=${EXE%.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 <