blob: da1c52cce3c08564e3ee2e776dffb1c010bbbea2 [file] [log] [blame]
kate.ward695ddde2008-06-26 22:22:26 +00001#!/bin/sh
2
3# source shflags
4. ../src/shflags
5
6debug() { [ ${FLAGS_debug} -eq ${FLAGS_TRUE} ] && echo "DEBUG: $@" >&2; }
7
8# define flags
9DEFINE_boolean 'debug' false 'enable debug mode' 'd'
10
11# parse the command-line
12FLAGS "$@" || exit 1; shift ${FLAGS_ARGC}
13
14debug 'debug mode enabled'
15echo 'something interesting'