From 94e5c852bc0d92c3d409c91c7afd886f11499e00 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Fri, 29 Dec 2017 13:36:42 +0100 Subject: Added basic skeleton of the shell script Signed-off-by: Olivier Gayot --- phpdoc.sh | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 phpdoc.sh (limited to 'phpdoc.sh') 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 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 -- cgit v1.2.3