diff options
Diffstat (limited to 'data')
-rwxr-xr-x | data/generate_menu | 10 |
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 @@ | |||
24 | FILENAME=menu.in | 24 | FILENAME=menu.in |
25 | 25 | ||
26 | find_it() { | 26 | find_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 | ||
47 | echo "[begin] (Fluxbox @VERSION@)" > $FILENAME | 48 | echo "[begin] (Fluxbox @VERSION@)" > $FILENAME |
48 | 49 | ||
49 | find_it xterm append "[exec] (xterm) {xterm -fg white -bg black | 50 | find_it xterm append "[exec] (xterm) {xterm -fg white -bg black}" |
50 | }" | ||
51 | find_it nedit append "[exec] (nedit) {nedit}" | 51 | find_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}" |
71 | append_menu "[end]" | 71 | append_menu "[end]" |
72 | 72 | ||
73 | 73 | ||