#!/bin/bash # USAGE: make-help $VERSION # Must be executed in the top-level build directory. if ! test -r share/g4beamline/G4blGuiInstructions.html then echo "make-help: wrong directory" exit 1 fi INPUTFILE=/tmp/in.$$ if test -x /bin/cygpath then INPUTFILE=`cygpath -m $INPUTFILE` fi trap "rm -f $INPUTFILE" 0 rm -f share/g4beamline/Help.html sed "s/VERSION/$1/" share/g4beamline/Help.html echo "" >>share/g4beamline/Help.html echo "

G4beamline Commands

" >>share/g4beamline/Help.html echo "
" >>share/g4beamline/Help.html
cat <<-! >$INPUTFILE
	*
	*
	*
	list commands
	*
	*
	*
	help -exit *
!
$PWD/bin/g4bl $INPUTFILE | \
    sed -e '1,/^----/d' -e 's/&/\&/g' -e 's/>/\>/g' -e 's/>share/g4beamline/Help.html
echo "
" >>share/g4beamline/Help.html echo "" >>share/g4beamline/Help.html echo "

List of Particles (QGSP)

" >>share/g4beamline/Help.html echo "
" >>share/g4beamline/Help.html
cat <<-! >$INPUTFILE
	physics QGSP
	*
	*
	*
	list -exit particles
!
$PWD/bin/g4bl $INPUTFILE \
    sed -e '1,/^----/d' -e 's/&/\&/g' -e 's/>/\>/g' -e 's/>share/g4beamline/Help.html
echo "
" >>share/g4beamline/Help.html echo "" >>share/g4beamline/Help.html