#! /bin/sh #---------------------------------------------------------------------------- # edit - ask user for edit # # usage: edit file # # return values: # 0 editor started # 1 editor not started # # Copyright (c) 2003 Frank Meyer # # Creation: 19.07.2003 fm # Last Update: 19.07.2003 fm # # 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. #---------------------------------------------------------------------------- configfile=$1 editor=$EDITOR if [ "$editor" = "" ] then editor=joe fi basename=`basename $editor` echo echo echo "Since there is no EIS/FAIR configuration tool, you must edit" echo "the EIS/FAIR configuration file $configfile with" echo "the editor $editor." echo if [ "$basename" = "joe" ] then echo "You can get help by joe if you press 'Ctrl-K H'." echo elif [ "$basename" = "vi" -o "$basename" = "vim" ] then echo "You can get help by vi/vim if you enter ':help'." echo fi if /var/install/bin/ask "Continue" then $editor $configfile exit 0 fi exit 1