1
0
mirror of synced 2025-12-18 05:12:17 +01:00

Add files via upload

This commit is contained in:
d-two
2022-12-07 09:01:53 +01:00
committed by GitHub
parent f26818d3de
commit 8c7f6b0b3a
34 changed files with 4781 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
#!/bin/bash
dflag=
vflag=
cflag=
if (( $# < 1 ))
then
cat /config/data/*.xml
exit 0
fi
for arg
do
delim=""
case "$arg" in
#translate --gnu-long-options to -g (short options)
--description) args="${args}-d ";;
--version) args="${args}-v ";;
--capabilities) args="${args}-c ";;
#pass through anything else
*) [[ "${arg:0:1}" == "-" ]] || delim="\""
args="${args}${delim}${arg}${delim} ";;
esac
done
#Reset the positional parameters to the short options
eval set -- $args
while getopts "dvc" option
do
case $option in
d) dflag=1;;
v) vflag=1;;
c) cflag=1;;
\?) printf "unknown option: -%s\n" $OPTARG
printf "Usage: %s: [--description] [--version] [--capabilities] \n" $(basename $0)
exit 2
;;
esac >&2
done
if [ "$dflag" ]
then
printf "XML file grabber\n"
fi
if [ "$vflag" ]
then
printf "0.1\n"
fi
if [ "$cflag" ]
then
printf "baseline\n"
fi
exit 0