source: tags/arb_5.5/GDEHELP/genhelp.sh

Last change on this file was 2336, checked in by westram, 21 years ago
  • removed 'ig' (Solaris does not like that)
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 523 bytes
Line 
1#!/bin/bash
2
3if [ -z "$4" ] ; then
4    echo "Usage: genhelp.sh outputfile title header inputtext"
5    echo "       Generates help pre-source 'outputfile' from 'inputtext'"
6    exit 1
7fi
8
9OUTPUTFILE=$1
10TITLE=$2
11HEADER=$3
12INPUTTEXT=$4
13
14if [ \! -f $HEADER ]; then
15    echo "Header '$HEADER' not found"
16    exit 1
17fi
18if [ \! -f $INPUTTEXT ]; then
19    echo "Input '$INPUTTEXT' not found"
20    exit 1
21fi
22
23write_help() {
24    echo "$TITLE"
25    echo ""
26    cat $HEADER
27    sed -e 's/^/    /' < $INPUTTEXT
28}
29
30write_help > $OUTPUTFILE
Note: See TracBrowser for help on using the repository browser.