#! /bin/sh #---------------------------------------------------------------------------- # /var/install/bin/system-base-set-menu-style - set menu style # # Copyright (c) 2001-2005 The Eisfair Team, c/o Frank Meyer, frank(at)eisfair(dot)org # # Creation: 06.08.2005 dv # Last Update: $Id$ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------- # include eislib . /var/install/include/eislib . /etc/config.d/setup a=dummy while [ $a != "" ] do clrhome mecho -info "Change eisfair menu style" mecho mecho mecho mecho mecho "Current eisfair menu style:" mecho if [ "$MENU" = "/var/install/bin/show-menu.cui" ] then menu='Curses style' else menu='Classic text style' fi mecho " Current style: $menu" mecho mecho " 1: Classic text style" mecho " 2: Curses style (new / beta)" mecho " ENTER: Return" mecho /var/install/bin/ask "Choose option:" '' '1' '2' '^$' > /tmp/ask.$$ rc=$? a=`cat /tmp/ask.$$` rm -f /tmp/ask.$$ if [ $rc = 255 ] then exit 1 fi case "$a" in 1) MENU="/var/install/bin/show-menu" ;; 2) MENU="/var/install/bin/show-menu.cui" ;; "") break ;; *) mecho -warn "invalid input." anykey ;; esac done sed -e "s#MENU='[^']*'#MENU='$MENU'#" \ /etc/config.d/setup >/tmp/edit-$$ cp /tmp/edit-$$ /etc/config.d/setup rm -f /tmp/edit-$$ mecho -info "Please exit from running menu applications to make changes take effect." anykey exit 0