blob: 3ccf333237c311403d4caf08b8acbf5f5d0e083e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/bin/ash
#This program cleans up the mess which convert.sh leaves if you remove a package
for i in `find /usr/lib/opie/apps/XQt2 -name *.desktop`; do
export name=$(echo $i | awk 'BEGIN {FS="."} {gsub("/",".")} {print $(NF-1)}')
#don't delete convert and cleanup icons
if [ $i != "/usr/lib/opie/apps/XQt2/convert.desktop" ] && [ $i != "/usr/lib/opie/apps/XQt2/cleanup.desktop" ] ; then
newfile=$(find /usr/share/applications/ -name $name.desktop)
else
newfile="donotdelete"
fi
if [ -z $newfile ] ; then
echo $name
echo $i
icon=$(cat $i | awk 'BEGIN {FS="="} {if ($1 == "Icon") {print $2} }')
rm -f /usr/lib/opie/bin/run$name
find /usr/lib/opie/pics/ -name $icon.* -exec rm -f {} \;
rm -f $i
fi
done
#update the icons
/usr/bin/icon-reload.sh
|