diff options
Diffstat (limited to 'recipes/xqtlauncher/xqtlauncher/xqtlauncher-cleanup.sh')
-rwxr-xr-x | recipes/xqtlauncher/xqtlauncher/xqtlauncher-cleanup.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/recipes/xqtlauncher/xqtlauncher/xqtlauncher-cleanup.sh b/recipes/xqtlauncher/xqtlauncher/xqtlauncher-cleanup.sh new file mode 100755 index 0000000000..3ccf333237 --- /dev/null +++ b/recipes/xqtlauncher/xqtlauncher/xqtlauncher-cleanup.sh @@ -0,0 +1,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 |