diff options
author | fluxgen <fluxgen> | 2002-05-24 13:19:45 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2002-05-24 13:19:45 (GMT) |
commit | e4b63778369c461980720bf345e95eb8e13579c2 (patch) | |
tree | ff7a5b61ad70399928f65b97369ab373f6d66f7e /data | |
parent | 0b1e5a15dc42cb66fdcc3c381f4b3de4e14f68e5 (diff) | |
download | fluxbox_lack-e4b63778369c461980720bf345e95eb8e13579c2.zip fluxbox_lack-e4b63778369c461980720bf345e95eb8e13579c2.tar.bz2 |
fixed so it runs on SunOS
Diffstat (limited to 'data')
-rwxr-xr-x | data/fluxbox-generate_menu | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/data/fluxbox-generate_menu b/data/fluxbox-generate_menu index 8b0fc30..6f40320 100755 --- a/data/fluxbox-generate_menu +++ b/data/fluxbox-generate_menu | |||
@@ -69,21 +69,21 @@ find_it() { | |||
69 | } | 69 | } |
70 | 70 | ||
71 | append() { | 71 | append() { |
72 | echo " $*" >> $FILENAME | 72 | echo " $*" >> ${FILENAME} |
73 | } | 73 | } |
74 | 74 | ||
75 | append_menu() { | 75 | append_menu() { |
76 | echo "$*" >> $FILENAME | 76 | echo "$*" >> ${FILENAME} |
77 | } | 77 | } |
78 | 78 | ||
79 | append_submenu() { | 79 | append_submenu() { |
80 | echo >> $FILENAME | 80 | echo >> ${FILENAME} |
81 | append_menu "[submenu] ($1)" | 81 | append_menu "[submenu] ($1)" |
82 | } | 82 | } |
83 | 83 | ||
84 | append_menu_end() { | 84 | append_menu_end() { |
85 | append_menu "[end]" | 85 | append_menu "[end]" |
86 | echo >> $FILENAME | 86 | echo >> ${FILENAME} |
87 | } | 87 | } |
88 | 88 | ||
89 | menu_entry() { | 89 | menu_entry() { |
@@ -150,19 +150,30 @@ done | |||
150 | # Set Defaults | 150 | # Set Defaults |
151 | 151 | ||
152 | # menufile name and make a backup | 152 | # menufile name and make a backup |
153 | [ ! $FILENAME ] && FILENAME=~/.fluxbox/menu | 153 | if [ -z ${FILENAME} ]; then |
154 | [ -e $FILENAME ] && cp -f $FILENAME ${FILENAME}.bak | 154 | FILENAME=~/.fluxbox/menu |
155 | fi | ||
156 | |||
157 | if [ ! -z ${FILENAME} ]; then | ||
158 | if [ -w ${FILENAME} ]; then | ||
159 | cp -f ${FILENAME} ${FILENAME}.bak | ||
160 | fi | ||
161 | fi | ||
155 | 162 | ||
156 | #packagedatadir | 163 | #packagedatadir |
157 | [ ! $PKGDATADIR ] && PKGDATADIR=/usr/share | 164 | if [ -z "${PKGDATADIR}" ]; then |
165 | PKGDATADIR=/usr/share | ||
166 | fi | ||
158 | 167 | ||
159 | # menutitle | 168 | # menutitle |
160 | [ ! $MENUTITLE ] && MENUTITLE="Fluxbox" | 169 | if [ -z "${MENUTITLE}" ]; then |
170 | MENUTITLE="Fluxbox" | ||
171 | fi | ||
161 | 172 | ||
162 | 173 | ||
163 | # Start of menu | 174 | # Start of menu |
164 | 175 | ||
165 | echo "[begin] ($MENUTITLE)" > $FILENAME | 176 | echo "[begin] ($MENUTITLE)" > ${FILENAME} |
166 | 177 | ||
167 | find_it xterm append "[exec] (xterm) {xterm -fg white -bg black}" | 178 | find_it xterm append "[exec] (xterm) {xterm -fg white -bg black}" |
168 | find_it nedit append "[exec] (nedit) {nedit}" | 179 | find_it nedit append "[exec] (nedit) {nedit}" |
@@ -298,7 +309,7 @@ if [ -d $PKGDATADIR/applnk/ ] && [ $KDEMENU ]; then | |||
298 | fi | 309 | fi |
299 | 310 | ||
300 | 311 | ||
301 | append_submenu Settings | 312 | append_submenu FB-Settings |
302 | append "[workspaces] (Workspace List)" | 313 | append "[workspaces] (Workspace List)" |
303 | 314 | ||
304 | append_menu "[submenu] (Styles) {Choose a style...}" | 315 | append_menu "[submenu] (Styles) {Choose a style...}" |