case $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac : This forces SH files to create target in same directory as SH file. : This is so that make depend always knows where to find SH derivatives. case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac #echo "Extracting install.sh (with variable substitutions)" : This section of the file will have variable substitutions done on it. : Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!. : Protect any dollar signs and backticks that you do not want interpreted : by putting a backslash in front. You may delete these comments. $spitshell >install.sh < \$G4LIB/\$G4SYSTEM/GNUmakefile.db echo "" echo "Starting installation..." echo "" cd $g4install/source echo `pwd` # There is no env! if [ X$g4global = Xy ] ; then $g4make global fi # There is env for binaries - for User: should be set in env.[c]sh! if [ X$g4granular = Xy ] ; then G4LIB_USE_GRANULAR=1 export G4LIB_USE_GRANULAR $g4make fi # There is no env! if [ X$g4includes_flag = Xy ] ; then $g4make includes fi !GROK!THIS! : In the following dollars and backticks do not need the extra backslash. $spitshell >>install.sh <<'!NO!SUBS!' !NO!SUBS! chmod 755 install.sh $eunicefix install.sh