diff options
author | Olivier Gayot <og@satcom1.com> | 2017-12-29 13:36:42 +0100 |
---|---|---|
committer | Olivier Gayot <og@satcom1.com> | 2017-12-29 13:38:22 +0100 |
commit | 94e5c852bc0d92c3d409c91c7afd886f11499e00 (patch) | |
tree | 4edfa0fc30767d68890204da823187ed1a1dbadc /phpdoc.sh | |
parent | 64008db6165a948823fe49445896c7794a20d330 (diff) |
Added basic skeleton of the shell script
Signed-off-by: Olivier Gayot <og@satcom1.com>
Diffstat (limited to 'phpdoc.sh')
-rw-r--r-- | phpdoc.sh | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/phpdoc.sh b/phpdoc.sh new file mode 100644 index 0000000..e705532 --- /dev/null +++ b/phpdoc.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +set -u +set -e + +function usage +{ + echo "Usage: $0 -f <function>" +} + +function lookup_function +{ + local name="$1" + + echo "Looking up function $name" +} + +opt_f= + +# Parse the arguments +while getopts :f: opt ; do + case ${opt} in + f) + opt_f="${OPTARG}" + ;; + \?) + echo "Invalid option -${OPTARG}." + exit 1 + ;; + :) + echo "Missing parameter for -${OPTARG}." + exit 1 + ;; + esac +done + +if [ -n "${opt_f}" ]; then + lookup_function "${opt_f}" +else + usage "$0" + exit 1 +fi |