#!/bin/sh
-if [ $# -lt 1 ]; then
- echo "usage: sztest [-H SYS-HEADER] [-L LOCAL-HEADER] TYPE [CCFLAGS...]" >&2
- exit 1
-fi
+usage() {
+ echo "usage: sztest [-h] [-H SYS-HEADER] [-L LOCAL-HEADER] TYPE [CCFLAGS...]"
+}
sheaders=
lheaders=
opt="$1"
shift
case "$opt" in
+ "-h")
+ usage
+ exit 0
+ ;;
"-H")
sheaders="$sheaders $1"
shift
;;
esac
done
+if [ $# -lt 1 ]; then
+ usage >&2
+ exit 1
+fi
type="$1"
shift
file="$(mktemp /tmp/sztestXXXXXX)"