Files
bash/doc/mkposix
T
2011-12-03 12:52:47 -05:00

26 lines
603 B
Bash
Executable File

#! /bin/sh
#
# mkposix - make the POSIX.NOTES file from the `Bash POSIX Mode' node
# of the texinfo manual
#
NODE="Bash POSIX Mode"
TEXI=bashref.texi
TMPINFO=temp.info
TMPOUT=POSIX.tmp
OUT=${1:-POSIX}
trap 'rm -f $TMPOUT $TMPINFO $OUT; trap '' 0; exit 1' 1 2 3 6 15
trap 'rm -f $TMPOUT $TMPINFO' 0
# create an info file without paragraph indentation
makeinfo --no-split -I../lib/readline/doc --paragraph-indent 0 -o $TMPINFO $TEXI
# write out the text from the `Bash POSIX Mode' node to $TMPOUT
info --file $TMPINFO --node "$NODE" --subnodes --output $TMPOUT
sed 1,2d < $TMPOUT > $OUT
exit 0