1
0
mirror of https://tildegit.org/tomasino/pb.git synced 2024-11-20 03:25:54 +01:00

fixing option arg references

This commit is contained in:
James Tomasino 2018-08-16 12:49:14 -04:00
parent 903b7d1199
commit 4024fead8d

7
pb
View File

@ -62,24 +62,19 @@ while true; do
case "$1" in case "$1" in
-h) -h)
flag_help=1 flag_help=1
shift
;; ;;
-v) -v)
flag_version=1 flag_version=1
shift
;; ;;
-f) -f)
flag_file=1 flag_file=1
shift
;; ;;
-s) -s)
shift shift
ENDPOINT="$1" ENDPOINT="$1"
shift
;; ;;
-x) -x)
flag_shortlist=1 flag_shortlist=1
shift
;; ;;
--) --)
shift shift
@ -89,13 +84,13 @@ while true; do
die "Internal error: $1" 3 die "Internal error: $1" 3
;; ;;
esac esac
shift
done done
if [ -z "$data" ]; then if [ -z "$data" ]; then
data="$*" data="$*"
fi fi
if [ ${flag_version} -gt 0 ]; then if [ ${flag_version} -gt 0 ]; then
printf "%s\\n" "${version}" printf "%s\\n" "${version}"
die "" 0 die "" 0