summaryrefslogtreecommitdiff
path: root/play
diff options
context:
space:
mode:
authorHorus32014-03-06 00:21:28 +0100
committerHorus32014-03-06 00:21:28 +0100
commitae1c2c9c9213c7a95590512ac06da4647ad235c8 (patch)
treecfac93c3db68342e47deed91c59eb598a8aa8e46 /play
parent10b232bc30bb024227cbdde2da477645aa8ad429 (diff)
downloaddotfiles-ae1c2c9c9213c7a95590512ac06da4647ad235c8.tar.gz
$ARCHIV
Diffstat (limited to 'play')
-rwxr-xr-xplay20
1 files changed, 9 insertions, 11 deletions
diff --git a/play b/play
index bbe8588..ff792a8 100755
--- a/play
+++ b/play
@@ -1,8 +1,8 @@
#!/bin/bash
-# bash script to play files from a slow network ressource with the mpv
-# caches the file in /tmp, after finishing it asks to move to the archiv
-# export global variable $ANIMEARCHIV
+# bash script to play files from a slow network ressource using mpv
+# caches the file in /tmp and moves to $ARCHIV
+# export global variable $ARCHIV
# set the exit code right for quitting
# echo "q quit 255" >> ~/.mpv/input.conf
@@ -12,15 +12,13 @@ function remove(){
if [ ! $verify ] || [ $verify = "ja" ] || [ $verify = "yes" ] || [ $verify = "j" ] || [ $verify = "y" ] || [ $verify = "Y" ]; then
rm -v "$1"
else
- echo "Okay, we don't remove $1. We are currently on $pwd."
+ echo "Okay, we don't remove $1."
fi
else
rm -v "$1"
fi
}
-pwd=$(pwd)
-
cp "$@" /tmp &
echo -n "Preparing the awesomeness! Starting playback in.."
echo -n " 3"
@@ -33,12 +31,12 @@ echo " Start!"
mpv /tmp/"$@"
if [ $? -eq 0 ]; then
- if [ -d $ANIMEARCHIV ]; then
+ if [ -d $ARCHIV ]; then
echo "Finished $@ succesfull."
- read -p "Should we move to the Archiv? ($ANIMEARCHIV) [Y/n/rm/other] " verify
+ read -p "Should we move to the Archiv? ($ARCHIV) [Y/n/rm/other] " verify
if [ ! $verify ] || [ $verify = "ja" ] || [ $verify = "yes" ] || [ $verify = "j" ] || [ $verify = "y" ] || [ $verify = "Y" ]; then
- echo "Moving the stuff to $ANIMEARCHIV"
- mv /tmp/"$@" "$ANIMEARCHIV"
+ echo "Moving the stuff to $ARCHIV"
+ mv /tmp/"$@" "$ARCHIV"
remove "$@" "verify"
elif [ $verify = "other" ] || [ $verify = "o" ] || [ $verify = "O" ] || [ $verify = "OTHER" ]; then
read -p "Please tell us the absolute path: " path
@@ -57,7 +55,7 @@ if [ $? -eq 0 ]; then
echo "Okay, don't touching the files."
fi
else
- echo "Can't move to \"$ANIMEARCHIV\". Directory doesn't exist."
+ echo "Can't move to \"$ARCHIV\". Directory doesn't exist."
exit 1
fi
else