4 if [ ! "$value" = "" ]; then
5 name=`echo "$name" | sed 'y:-\[\]:_____:'`
6 value=`echo "$value" | sed 's:":\\\":g'`
11 #convert true/false to 1/0
13 if [ ! "$1" = "" ]; then
14 if [ "$1" = "True" ]; then
23 if [ ! "$1" = "" ]; then
28 convert_desktop_to_eap() {
29 echo "Adding $1 to e menu"
31 #on empty line clear vars
32 if [ "$l" = "" ]; then
34 #grab previous var if it exists
40 #if an = is in the line it's a name/value pair
41 if echo "$l" | grep -q "="; then
43 #grab previous var if it exists
46 name=`echo "$l" | cut -d "=" -f 1`
47 value=`echo "$l" | cut -d "=" -f 2-`
50 #if previous value assume this is a continuation
51 if [ ! "$value" = "" ]; then
62 bool "$StartupNotify" -set-startup-notify
64 str "$Comment" -set-comment
67 if [ ! "$cmd" = "" ]; then
68 eapFile="$PATH_TO_EAP/$2"
69 if [ -e $eapFile ]; then
70 echo "EAP file for $2 already created";
72 echo "Converting $1 to $2"
73 #cp ~/.e/e/applications/all/aterm.eap gpe-othello.eap
75 ##enlightenment_eapp | grep -- -set- | cut -d " " -f 3 | xargs -iCMD enlightenment_eapp gpe-othello.eap CMD \"\"
76 #enlightenment_eapp gpe-othello.eap -del-all
78 cat <<EOF > /tmp/gpeEap.edc
93 image.normal: "$Icon";
101 edje_cc --image_dir "$PATH_TO_PIXMAPS" /tmp/gpeEap.edc "$eapFile"
104 cmd="enlightenment_eapp \"$eapFile\" $cmd"
106 #pipe command in sh to allow it to re-interpret quotes
107 echo $cmd | /bin/sh -s
110 if `echo "$Categories" | grep -q "SystemSettings"`; then
112 elif `echo "$Categories" | grep -q "PIM"`; then
114 elif `echo "$Categories" | grep -q "Network"`; then
116 elif `echo "$Categories" | grep -q "Games"`; then
118 elif `echo "$Categories" | grep -q "Game"`; then
120 elif `echo "$Categories" | grep -q "AudioVideo"`; then
122 elif `echo "$Categories" | grep -q "Panel"`; then
124 elif `echo "$Categories" | grep -q "Utility"`; then
130 #dir=`echo "$Categories" | sed 'y:;:/:'`
131 mkdir -p "$PATH_TO_E_GPE/$dir"
132 orderFile="$PATH_TO_E_GPE/$dir"/.order
134 if [ -e "$orderFile" ]; then
135 if grep -q "$2" "$orderFile"; then
136 echo "$2 is already in the $dir menu"
140 if [ "$add" -eq 1 ]; then
141 echo "Adding $2 to $dir menu"
142 echo "$2" >> "$orderFile"
147 PATH_TO_DESKTOP="/usr/share/applications"
148 PATH_TO_PIXMAPS="/usr/share/pixmaps"
149 PATH_TO_EAP="/home/root/.e/e/applications/all"
150 PATH_TO_E_GPE="/home/root/.e/e/applications/favorite/GPE"
152 if [ ! -d $PATH_TO_E_GPE ]; then
153 mkdir -p $PATH_TO_E_GPE
155 if [ ! -d $PATH_TO_EAP ]; then
156 mkdir -p $PATH_TO_EAP
158 cd "$PATH_TO_DESKTOP"
159 for f in `ls *.desktop`; do
160 eap=`echo "$f" | cut -d . -f 1`
161 convert_desktop_to_eap "$PATH_TO_DESKTOP/$f" "$eap.eap"