diff options
author | Justin Patrin <papercrane@gmail.com> | 2006-02-15 21:06:28 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2006-02-15 21:06:28 +0000 |
commit | d870761e63fd5aaead1465b4d20adac312e5b6f1 (patch) | |
tree | 48ab935d12291a04f5080eec4bd00950f2c3b41f /packages | |
parent | 6b68a3d066c85b9a0292c8c2ed9f71b96e66f3fb (diff) |
e17-gpe-menu-convert: don't create eaps which already exist, don't add items to menus when they are already in there, re-added postinst, fixed DEPENDS
Diffstat (limited to 'packages')
-rw-r--r-- | packages/e17/e17-gpe-menu-convert/e17-gpe-menu-convert.sh | 41 | ||||
-rw-r--r-- | packages/e17/e17-gpe-menu-convert_0.2.bb | 10 |
2 files changed, 34 insertions, 17 deletions
diff --git a/packages/e17/e17-gpe-menu-convert/e17-gpe-menu-convert.sh b/packages/e17/e17-gpe-menu-convert/e17-gpe-menu-convert.sh index 63e984d7f6..bbb5e12211 100644 --- a/packages/e17/e17-gpe-menu-convert/e17-gpe-menu-convert.sh +++ b/packages/e17/e17-gpe-menu-convert/e17-gpe-menu-convert.sh @@ -26,7 +26,7 @@ str() { } convert_desktop_to_eap() { - echo "Converting $1 to $2" + echo "Adding $1 to e menu" for l in `cat $1`; do #on empty line clear vars if [ "$l" = "" ]; then @@ -65,12 +65,17 @@ convert_desktop_to_eap() { str "$Exec" -set-exe if [ ! "$cmd" = "" ]; then - #cp ~/.e/e/applications/all/aterm.eap gpe-othello.eap - ##empty out eap file - ##enlightenment_eapp | grep -- -set- | cut -d " " -f 3 | xargs -iCMD enlightenment_eapp gpe-othello.eap CMD \"\" - #enlightenment_eapp gpe-othello.eap -del-all + eapFile="$PATH_TO_EAP/$2" + if [ -e $eapFile ]; then + echo "EAP file for $2 already created"; + else + echo "Converting $1 to $2" + #cp ~/.e/e/applications/all/aterm.eap gpe-othello.eap + ##empty out eap file + ##enlightenment_eapp | grep -- -set- | cut -d " " -f 3 | xargs -iCMD enlightenment_eapp gpe-othello.eap CMD \"\" + #enlightenment_eapp gpe-othello.eap -del-all - cat <<EOF > /tmp/gpeEap.edc + cat <<EOF > /tmp/gpeEap.edc images { image: "$Icon" COMP; } @@ -93,13 +98,14 @@ collections { } EOF - edje_cc --image_dir "$PATH_TO_PIXMAPS" /tmp/gpeEap.edc "$PATH_TO_EAP/$2" - rm /tmp/gpeEap.edc + edje_cc --image_dir "$PATH_TO_PIXMAPS" /tmp/gpeEap.edc "$eapFile" + rm /tmp/gpeEap.edc - cmd="enlightenment_eapp \"$PATH_TO_EAP/$2\" $cmd" + cmd="enlightenment_eapp \"$eapFile\" $cmd" - #pipe command in sh to allow it to re-interpret quotes - echo $cmd | /bin/sh -s + #pipe command in sh to allow it to re-interpret quotes + echo $cmd | /bin/sh -s + fi if `echo "$Categories" | grep -q "SystemSettings"`; then dir="Settings" @@ -123,7 +129,18 @@ EOF #dir=`echo "$Categories" | sed 'y:;:/:'` mkdir -p "$PATH_TO_E_GPE/$dir" - echo "$2" >> "$PATH_TO_E_GPE/$dir"/.order + orderFile="$PATH_TO_E_GPE/$dir"/.order + add=1 + if [ -e "$orderFile" ]; then + if grep -q "$2" "$orderFile"; then + echo "$2 is already in the $dir menu" + add=0 + fi + fi + if [ "$add" -eq 1 ]; then + echo "Adding $2 to $dir menu" + echo "$2" >> "$orderFile" + fi fi } diff --git a/packages/e17/e17-gpe-menu-convert_0.2.bb b/packages/e17/e17-gpe-menu-convert_0.2.bb index 88eefa774e..a2db9f0686 100644 --- a/packages/e17/e17-gpe-menu-convert_0.2.bb +++ b/packages/e17/e17-gpe-menu-convert_0.2.bb @@ -1,10 +1,10 @@ DESCRIPTION = "Shell script to convert GPE .desktop files into e17 eap files and menus" -DEPENDS = "edje e-wm" +DEPENDS = "edje-utils e-wm" RDEPENDS += "edje-utils e-wm" LICENSE = "MIT" SECTION = "e/apps" MAINTAINER = "Justin Patrin <papercrane@reversefold.com>" -PR = "r2" +PR = "r3" SRC_URI = "file://e17-gpe-menu-convert.sh" @@ -13,6 +13,6 @@ do_install() { install -m 755 ${WORKDIR}/e17-gpe-menu-convert.sh ${D}/usr/bin/e17-gpe-menu-convert.sh } -#pkg_postinst() { -# /usr/bin/e17-gpe-menu-convert.sh -#} +pkg_postinst() { + /usr/bin/e17-gpe-menu-convert.sh +} |