|
Last change
on this file was
10842,
checked in by westram, 12 years ago
|
- reintegrates 'help' into 'trunk':
- adds:
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
-
Property svn:keywords set to
Author Date Id Revision
|
|
File size:
1.2 KB
|
| Line | |
|---|
| 1 | #!/bin/bash |
|---|
| 2 | |
|---|
| 3 | if [ -z "$5" ] ; then # need at least 2 'inputtext's |
|---|
| 4 | echo "Usage: genhelptree.sh outputfile title header [inputtext]+" |
|---|
| 5 | echo " Generates help pre-sources 'outputfile_*' from several 'inputtext's" |
|---|
| 6 | echo " Creates an index page." |
|---|
| 7 | exit 1 |
|---|
| 8 | fi |
|---|
| 9 | |
|---|
| 10 | INDEXFILE=$1 |
|---|
| 11 | MAINTITLE=$2 |
|---|
| 12 | HEADER=$3 |
|---|
| 13 | shift;shift;shift |
|---|
| 14 | SED=${ARBHOME}/SH/arb_sed |
|---|
| 15 | |
|---|
| 16 | test -f $INDEXFILE && chmod u+w $INDEXFILE |
|---|
| 17 | |
|---|
| 18 | BASE=`echo $INDEXFILE | $SED -e 's/^.*\///' | $SED -e 's/.help//'` |
|---|
| 19 | PREFIX=`echo $INDEXFILE | $SED -e 's/\/[^\/]*$//'` |
|---|
| 20 | echo "BASE='$BASE' PREFIX='$PREFIX'" |
|---|
| 21 | |
|---|
| 22 | write_index() { |
|---|
| 23 | echo "$BASE [docindex]" |
|---|
| 24 | echo "" |
|---|
| 25 | echo "Documents provided with $BASE:" |
|---|
| 26 | echo "" |
|---|
| 27 | # cat $HEADER |
|---|
| 28 | |
|---|
| 29 | while [ \! -z "$1" ]; do |
|---|
| 30 | SUBBASE=`echo $1 | $SED -e 's/^.*\///'` |
|---|
| 31 | ESCAPED_SUBBASE=`echo $SUBBASE | $SED -e 's/\./_/'` |
|---|
| 32 | echo " - LINK{agde_${BASE}_sub_${ESCAPED_SUBBASE}.hlp}" |
|---|
| 33 | shift |
|---|
| 34 | done |
|---|
| 35 | } |
|---|
| 36 | |
|---|
| 37 | write_index $* > $INDEXFILE |
|---|
| 38 | test -f $INDEXFILE && chmod a-w $INDEXFILE |
|---|
| 39 | |
|---|
| 40 | while [ \! -z "$1" ]; do |
|---|
| 41 | SUBBASE=`echo $1 | $SED -e 's/^.*\///'` |
|---|
| 42 | ESCAPED_SUBBASE=`echo $SUBBASE | $SED -e 's/\./_/'` |
|---|
| 43 | ./genhelp.sh $PREFIX/${BASE}_sub_$ESCAPED_SUBBASE.help "$SUBBASE" $HEADER $1 |
|---|
| 44 | shift |
|---|
| 45 | done |
|---|
| 46 | |
|---|
| 47 | # exit 1 |
|---|
Note: See
TracBrowser
for help on using the repository browser.