export SAVE_OVERLAY=0
export DELAY=
export CONF_IMAGE=
+export HELP=0
# parse options
while [ -n "$1" ]; do
-n) export SAVE_CONFIG=0;;
-c) export SAVE_OVERLAY=1;;
-f) export CONF_IMAGE="$2"; shift;;
+ -h|--help) export HELP=1; break;;
-*)
echo "Invalid option: $1"
exit 1
export ARGV="$*"
export ARGC="$#"
-[ -z "$ARGV" ] && {
+[ -z "$ARGV" -o $HELP -gt 0 ] && {
cat <<EOF
Usage: $0 [options] <image file or URL>
-n do not save configuration over reflash
-q less verbose
-v more verbose
+ -h / --help display this help
EOF
exit 1