diff options
author | Pavol Rusnak <stick@gk2.sk> | 2010-03-17 16:02:46 +0100 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2010-05-04 12:51:21 +0300 |
commit | 3b96dfb29ab75a4f7f37713a93ec39460c158ef0 (patch) | |
tree | 695a1cf8a148ec864a6c336e1efa10514fdd9f11 /scripts | |
parent | ed74161b7e5b90ba886926ced14ba3aca018a4f4 (diff) | |
download | librpm-tizen-3b96dfb29ab75a4f7f37713a93ec39460c158ef0.tar.gz librpm-tizen-3b96dfb29ab75a4f7f37713a93ec39460c158ef0.tar.bz2 librpm-tizen-3b96dfb29ab75a4f7f37713a93ec39460c158ef0.zip |
Don't process desktop files without Type=Application and Exec= line
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/desktop-file.prov | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/desktop-file.prov b/scripts/desktop-file.prov index abb79f990..5b159ae9a 100755 --- a/scripts/desktop-file.prov +++ b/scripts/desktop-file.prov @@ -9,11 +9,13 @@ OLD_IFS="$IFS" while read instfile ; do case "$instfile" in *.desktop) - mime=`cat "$instfile" | grep MimeType= | cut -d'=' -f2` - IFS=';' + if ! grep -q '^Type=Application$' "$instfile"; then continue; fi + if ! grep -q '^Exec=' "$instfile"; then continue; fi + mime=`grep '^MimeType=' "$instfile" | cut -d'=' -f2` + IFS=';' for type in $mime ; do - echo 'mimehandler('$type')' - done + echo 'mimehandler('$type')' + done ;; esac done |