diff options
| author | Horus3 | 2014-03-17 02:20:08 +0100 |
|---|---|---|
| committer | Horus3 | 2014-03-17 02:20:08 +0100 |
| commit | 65e75e62722269915239ca1497df5b0b9bb42d46 (patch) | |
| tree | e491432a5aed5044cb4e28e275a8049a59f46ff2 /bin | |
| parent | b907b0852e3958b982b43f63b7513df73e6d5df3 (diff) | |
| download | dotfiles-65e75e62722269915239ca1497df5b0b9bb42d46.tar.gz | |
Added support for relative path.
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/play | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -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 |
