#! /bin/sh #---------------------------------------------------------------------------- # doc - ask user for doc view # # usage: doc file # # return values: # 0 viewer started # 1 viewer not started # # Copyright (c) 2003 Frank Meyer # # Creation: 28.08.2003 fm # Last Update: 31.08.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. #---------------------------------------------------------------------------- docfile=$1 echo echo echo "The documentation will be shown by the program 'less'" echo "You can get help by typing the key 'h', 'q' to quit." echo pager=$pager if [ "$pager" = "" ] then pager=less fi if /var/install/bin/ask "Continue" then if [ -f $docfile -a -s $docfile ] then export LESSCHARSET=latin1 $pager $docfile exit 0 else colecho "Could not find desired documentation!" br x br /var/install/bin/anykey fi fi exit 1