summaryrefslogtreecommitdiffstats
path: root/libkonq/favicons/move_favicons.sh
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit4aed2c8219774f5d797760606b8489a92ddc5163 (patch)
tree3f8c130f7d269626bf6a9447407ef6c35954426a /libkonq/favicons/move_favicons.sh
downloadtdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz
tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkonq/favicons/move_favicons.sh')
-rwxr-xr-xlibkonq/favicons/move_favicons.sh41
1 files changed, 41 insertions, 0 deletions
diff --git a/libkonq/favicons/move_favicons.sh b/libkonq/favicons/move_favicons.sh
new file mode 100755
index 000000000..a06d7d2bd
--- /dev/null
+++ b/libkonq/favicons/move_favicons.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+prefix=$(kde-config --localprefix)
+source1="$prefix/share/icons/favicons"
+source2="$prefix/share/cache/favicons"
+dest="$(kde-config --path cache)/favicons"
+
+if [ -n "$prefix" -a -d "$source1" ]; then
+ while [ ! -d "$dest" ]; do
+ dir="$dest"
+ while [ ! -d `dirname "$dir"` ]; do
+ dir=`dirname "$dir"`
+ done
+ mkdir "$dir" || exit 1
+ done
+
+ icons=`ls "$source1" 2>/dev/null`
+ if [ -n "$icons" ]; then
+ for i in $icons; do
+ mv -f "$source1/$i" "$dest/$i"
+ done
+ fi
+ rmdir "$source1"
+fi
+if [ -n "$prefix" -a -d "$source2" ]; then
+ while [ ! -d "$dest" ]; do
+ dir="$dest"
+ while [ ! -d `dirname "$dir"` ]; do
+ dir=`dirname "$dir"`
+ done
+ mkdir "$dir" || exit 1
+ done
+
+ icons=`ls "$source2" 2>/dev/null`
+ if [ -n "$icons" ]; then
+ for i in $icons; do
+ mv -f "$source2/$i" "$dest/$i"
+ done
+ fi
+ rmdir "$source2"
+fi