diff options
Diffstat (limited to 'bin/play')
| -rwxr-xr-x | bin/play | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -8,6 +8,7 @@ # echo "q quit 255" >> ~/.mpv/input.conf printhelp(){ + echo "Bash script to play and cache files from a slow network ressource" echo "" echo "-y move to archiv without question" @@ -16,13 +17,10 @@ printhelp(){ echo "-r only remove the file in /tmp" echo "-d don't ask for downloading" echo "-h prints this help" + exit 0 } -if [ $# -eq 0 ]; then - printhelp -fi - while true; do case "$1" in -y|-Y|-yes|-j|-ja) verify="yes" @@ -34,7 +32,7 @@ while true; do -o|-other|-ot) verify="other" shift ;; - -n|-no|-nope|-nein) verify= + -n|-no|-nope|-nein) verify="no" shift ;; -d|-download|-down) download="yes" @@ -47,6 +45,10 @@ while true; do esac done +if [ $# -eq 0 ]; then + printhelp +fi + player[0]=$(command -v mpv) #media player of choice player[1]=$(command -v mplayer) player[2]=$(command -v vlc) #you shouldn't use vlc |
