added option handler draft
This commit is contained in:
parent
7015f8c924
commit
70704f01c7
|
@ -0,0 +1,26 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# shell option handler
|
||||||
|
|
||||||
|
version="0.1"
|
||||||
|
author="david@socialnerds.org"
|
||||||
|
|
||||||
|
|
||||||
|
while getopts c:s:vh options
|
||||||
|
do
|
||||||
|
case "$options" in
|
||||||
|
c)
|
||||||
|
echo "configfile = $OPTARG";;
|
||||||
|
s)
|
||||||
|
echo "sourcefile = $OPTARG";;
|
||||||
|
v)
|
||||||
|
echo "version message";;
|
||||||
|
h)
|
||||||
|
echo "help message";;
|
||||||
|
?)
|
||||||
|
echo "questionmark";;
|
||||||
|
*)
|
||||||
|
echo "nothing";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
Reference in New Issue