fixed so it runs on SunOS

This commit is contained in:
fluxgen 2002-05-24 13:19:45 +00:00
parent 0b1e5a15dc
commit e4b6377836

View file

@ -69,21 +69,21 @@ find_it() {
} }
append() { append() {
echo " $*" >> $FILENAME echo " $*" >> ${FILENAME}
} }
append_menu() { append_menu() {
echo "$*" >> $FILENAME echo "$*" >> ${FILENAME}
} }
append_submenu() { append_submenu() {
echo >> $FILENAME echo >> ${FILENAME}
append_menu "[submenu] ($1)" append_menu "[submenu] ($1)"
} }
append_menu_end() { append_menu_end() {
append_menu "[end]" append_menu "[end]"
echo >> $FILENAME echo >> ${FILENAME}
} }
menu_entry() { menu_entry() {
@ -150,19 +150,30 @@ done
# Set Defaults # Set Defaults
# menufile name and make a backup # menufile name and make a backup
[ ! $FILENAME ] && FILENAME=~/.fluxbox/menu if [ -z ${FILENAME} ]; then
[ -e $FILENAME ] && cp -f $FILENAME ${FILENAME}.bak FILENAME=~/.fluxbox/menu
fi
if [ ! -z ${FILENAME} ]; then
if [ -w ${FILENAME} ]; then
cp -f ${FILENAME} ${FILENAME}.bak
fi
fi
#packagedatadir #packagedatadir
[ ! $PKGDATADIR ] && PKGDATADIR=/usr/share if [ -z "${PKGDATADIR}" ]; then
PKGDATADIR=/usr/share
fi
# menutitle # menutitle
[ ! $MENUTITLE ] && MENUTITLE="Fluxbox" if [ -z "${MENUTITLE}" ]; then
MENUTITLE="Fluxbox"
fi
# Start of menu # Start of menu
echo "[begin] ($MENUTITLE)" > $FILENAME echo "[begin] ($MENUTITLE)" > ${FILENAME}
find_it xterm append "[exec] (xterm) {xterm -fg white -bg black}" find_it xterm append "[exec] (xterm) {xterm -fg white -bg black}"
find_it nedit append "[exec] (nedit) {nedit}" find_it nedit append "[exec] (nedit) {nedit}"
@ -298,7 +309,7 @@ if [ -d $PKGDATADIR/applnk/ ] && [ $KDEMENU ]; then
fi fi
append_submenu Settings append_submenu FB-Settings
append "[workspaces] (Workspace List)" append "[workspaces] (Workspace List)"
append_menu "[submenu] (Styles) {Choose a style...}" append_menu "[submenu] (Styles) {Choose a style...}"