diff options
Diffstat (limited to 'bin/play')
| -rwxr-xr-x | bin/play | 22 |
1 files changed, 14 insertions, 8 deletions
@@ -17,7 +17,7 @@ printhelp(){ echo " -n don't ask for moving" echo " -y move to archiv without question" echo " -o ask for a different archiv" - echo " -no-cache Not caching the file, instead play's directly" + echo " --no-cache Not caching the file, instead play's directly" exit 0 } @@ -26,26 +26,32 @@ cache=1 while true; do case "$1" in - -no-cache|-nc) cache=0 + --no-cache|--nc) cache=0 shift ;; - -y|-Y|-yes|-j|-ja) verify="yes" + -y|-Y|--yes|-j|-ja) verify="yes" shift ;; - -r|-rm|-remove) verify="rm" + -d|--rm|--remove) verify="rm" shift ;; - -o|-other|-ot) verify="other" + -o|--other|--ot) verify="other" shift ;; - -n|-no|-nope|-nein) verify="no" + -n|--no|--nope|--nein) verify="no" shift ;; - -d|-download|-down) download="yes" + -g|--download|--down) download="yes" shift ;; -h|--help) printhelp ;; + --) shift #stops processing arguments + break + ;; + -*) echo "'$1' Unknown argument." + exit 1 + ;; *) break ;; esac @@ -62,7 +68,7 @@ fi if [ ! -f "$1" ]; then echo "No valid file input." - exit + exit 1 fi player[0]=$(command -v mpv) #media player of choice |
