PageRenderTime 54ms CodeModel.GetById 28ms RepoModel.GetById 0ms app.codeStats 0ms

/recipes/xqtlauncher/xqtlauncher/xqtlauncher-cleanup.sh

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