summaryrefslogtreecommitdiffstats
path: root/src/userscript.sh
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-03-01 19:09:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-03-01 19:09:31 +0000
commitf2cfda2a54780868dfe0af7bd652fcd4906547da (patch)
treec6ac23545528f5701818424f2af5f79ce3665e6c /src/userscript.sh
downloadsoundkonverter-f2cfda2a54780868dfe0af7bd652fcd4906547da.tar.gz
soundkonverter-f2cfda2a54780868dfe0af7bd652fcd4906547da.zip
Added KDE3 version of SoundKonverter
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/soundkonverter@1097614 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/userscript.sh')
-rwxr-xr-xsrc/userscript.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/userscript.sh b/src/userscript.sh
new file mode 100755
index 0000000..3f7714b
--- /dev/null
+++ b/src/userscript.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+COVERNAMES="cover.jpg cover.png front.jpg front.png"
+
+for COVERNAME in $COVERNAMES; do
+
+ S_FILENAME=`echo "$1" | sed "s/^.*\///"`
+ S_DIRECTORY=`echo "$1" | sed "s/$S_FILENAME//"`
+ SOURCE=`ls "$S_DIRECTORY" | grep -F $COVERNAME`
+
+ D_FILENAME=`echo "$2" | sed "s/^.*\///"`
+ D_DIRECTORY=`echo "$2" | sed "s/$D_FILENAME//"`
+ DESTINATION="$COVERNAME"
+
+ if [ $SOURCE ]; then
+# echo "cp $S_DIRECTORY$SOURCE $D_DIRECTORY$DESTINATION"
+ cp --update "$S_DIRECTORY$SOURCE" "$D_DIRECTORY$DESTINATION"
+ fi
+
+done
+
+exit 0