add more spacing
[personal-kdebase.git] / apps / lib / konq / favicons / move_favicons.sh
blobb965a0e7044f2803621c26934d419d804280c07f
1 #!/bin/sh
3 prefix=$(kde4-config --localprefix)
4 source1="$prefix/share/icons/favicons"
5 source2="$prefix/share/cache/favicons"
6 dest="$(kde4-config --path cache)/favicons"
8 if [ -n "$prefix" -a -d "$source1" ]; then
9 while [ ! -d "$dest" ]; do
10 dir="$dest"
11 while [ ! -d `dirname "$dir"` ]; do
12 dir=`dirname "$dir"`
13 done
14 mkdir "$dir" || exit 1
15 done
17 icons=`ls "$source1" 2>/dev/null`
18 if [ -n "$icons" ]; then
19 for i in $icons; do
20 mv -f "$source1/$i" "$dest/$i"
21 done
23 rmdir "$source1"
25 if [ -n "$prefix" -a -d "$source2" ]; then
26 while [ ! -d "$dest" ]; do
27 dir="$dest"
28 while [ ! -d `dirname "$dir"` ]; do
29 dir=`dirname "$dir"`
30 done
31 mkdir "$dir" || exit 1
32 done
34 icons=`ls "$source2" 2>/dev/null`
35 if [ -n "$icons" ]; then
36 for i in $icons; do
37 mv -f "$source2/$i" "$dest/$i"
38 done
40 rmdir "$source2"