/recipes/xqtlauncher/xqtlauncher/xqtlauncher-cleanup.sh
Shell | 21 lines | 17 code | 0 blank | 4 comment | 6 complexity | 61f6a1f6a4a15480f2d6ae54ae5252cf MD5 | raw file
Possible License(s): BSD-3-Clause, GPL-2.0, GPL-3.0, LGPL-2.0, LGPL-2.1, LGPL-3.0
- #!/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