summaryrefslogtreecommitdiff
path: root/bin/play
diff options
context:
space:
mode:
authorHorus32014-03-17 02:20:08 +0100
committerHorus32014-03-17 02:20:08 +0100
commit65e75e62722269915239ca1497df5b0b9bb42d46 (patch)
treee491432a5aed5044cb4e28e275a8049a59f46ff2 /bin/play
parentb907b0852e3958b982b43f63b7513df73e6d5df3 (diff)
downloaddotfiles-65e75e62722269915239ca1497df5b0b9bb42d46.tar.gz
Added support for relative path.
Diffstat (limited to 'bin/play')
-rwxr-xr-xbin/play12
1 files changed, 7 insertions, 5 deletions
diff --git a/bin/play b/bin/play
index 6893d53..29c2af5 100755
--- a/bin/play
+++ b/bin/play
@@ -123,16 +123,18 @@ echo " Start!"
cd "$tmp"
-$player "$@"
+file=${@##*/}
+
+$player "$file"
if [ $? -eq 0 ]; then
if [ -d $ARCHIV ] && [ -w $ARCHIV ]; then
- echo "Finished $@ succesfull."
+ echo "Finished $file succesfull."
if [ ! $verify ]; then
read -p "Should we move everything to the archiv? ($ARCHIV) [Y/n/rm/other] " verify
fi
if [ ! $verify ] || [ $verify = "ja" ] || [ $verify = "yes" ] || [ $verify = "j" ] || [ $verify = "y" ] || [ $verify = "Y" ]; then
echo "Moving the stuff to $ARCHIV."
- mv -v "$@" "$ARCHIV"
+ mv -v "$file" "$ARCHIV"
if [ $? -eq 0 ]; then
cd "$pwd"
rm -v "$@"
@@ -141,7 +143,7 @@ if [ $? -eq 0 ]; then
read -p "Please tell us the absolute path: " path
if [ -d $path ] && [ -w $path ]; then
echo "Moving to $path."
- mv -v "$@" "$path"
+ mv -v "$file" "$path"
if [ $? -eq 0 ]; then
cd "$pwd"
rm -v "$@"
@@ -152,7 +154,7 @@ if [ $? -eq 0 ]; then
fi
elif [ $verify = "r" ] || [ $verify = "rm" ] || [ $verify = "remove" ] || [ $verify = "RM" ] || [ $verify = "R" ]; then
echo "Cleaning the mess up. Only removing files from $tmp."
- rm -v "$@"
+ rm -v "$file"
else
echo "Okay, don't touching the files."
fi