summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcustom/uucp-mediaserver/scripts/queue30
1 files changed, 7 insertions, 23 deletions
diff --git a/custom/uucp-mediaserver/scripts/queue b/custom/uucp-mediaserver/scripts/queue
index 1644bd2d..49c7a3bc 100755
--- a/custom/uucp-mediaserver/scripts/queue
+++ b/custom/uucp-mediaserver/scripts/queue
@@ -46,29 +46,13 @@ suffix=${base##*.}
46force=0 46force=0
47noCall=false 47noCall=false
48prepend=false 48prepend=false
49while getopts "frp" OPT; do 49
50 case $OPT in 50typeset -A opts
51 r) 51zparseopts -A opts -- r p f::
52 noCall=true 52
53 ;; 53force=${opts[-f]:-${+opts[-f]}}
54 f) 54[[ -v opts[-p] ]] && prepend=true
55 if [[ ${@:$OPTIND} =~ ^[0-9]+$ ]];then 55[[ -v opts[-r] ]] && noCall=true
56 force=${@:$OPTIND}
57 OPTIND=$((OPTIND+1))
58 else
59 force=1
60 fi
61 ;;
62 p)
63 prepend=true
64 ;;
65 \?)
66 echo "Invalid option -${OPTARG}" >&2
67 exit 2
68 ;;
69 esac
70done
71shift $((OPTIND-1))
72 56
73printf "force: %d, noCall: %s, prepend: %s\n" ${force} ${noCall} ${prepend} | debug 57printf "force: %d, noCall: %s, prepend: %s\n" ${force} ${noCall} ${prepend} | debug
74 58