aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdata/generate_menu10
1 files changed, 5 insertions, 5 deletions
diff --git a/data/generate_menu b/data/generate_menu
index f88a517..736c25a 100755
--- a/data/generate_menu
+++ b/data/generate_menu
@@ -24,8 +24,9 @@
24FILENAME=menu.in 24FILENAME=menu.in
25 25
26find_it() { 26find_it() {
27 if [ ! -z "$(which $1 2>/dev/null | grep "^/.*$1")" ]; then 27 _it="`which \"$1\" 2>/dev/null | grep \"^/.*$1\"`"
28 if [ -x "$(which $1)" ]; then 28 if [ ! -z "$_it" ]; then
29 if [ -x "$_it" ]; then
29 shift 30 shift
30 $* 31 $*
31 else 32 else
@@ -46,8 +47,7 @@ append_menu() {
46 47
47echo "[begin] (Fluxbox @VERSION@)" > $FILENAME 48echo "[begin] (Fluxbox @VERSION@)" > $FILENAME
48 49
49find_it xterm append "[exec] (xterm) {xterm -fg white -bg black 50find_it xterm append "[exec] (xterm) {xterm -fg white -bg black}"
50}"
51find_it nedit append "[exec] (nedit) {nedit}" 51find_it nedit append "[exec] (nedit) {nedit}"
52 52
53 53
@@ -67,7 +67,7 @@ append_menu "[submenu] (Editors)"
67 find_it gedit append "[exec] (gedit) {gedit}" 67 find_it gedit append "[exec] (gedit) {gedit}"
68 find_it xedit append "[exec] (xedit) {xedit}" 68 find_it xedit append "[exec] (xedit) {xedit}"
69 find_it kword append "[exec] (kword) {kword}" 69 find_it kword append "[exec] (kword) {kword}"
70 find_it kwrite append "[exec] (kword) {kwrite}" 70 find_it kwrite append "[exec] (kwrite) {kwrite}"
71append_menu "[end]" 71append_menu "[end]"
72 72
73 73