case $CONFIG in
'')
	if test ! -f config.sh; then
		ln ../config.sh . || \
		ln ../../config.sh . || \
		ln ../../../config.sh . || \
		ln ../../../../config.sh . || \
		(echo "Can't find config.sh."; exit 1)
	fi 2>/dev/null
	. ./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 tcsh (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 >tcsh <<!GROK!THIS!
##
##	Aliases for Environment Modification
##
#################################################################
##  $Id: tcsh.SH,v 2.0 1993/02/21 00:02:43 jlf Exp jlf $
#################################################################

if ( \$?histchars ) then
  set histchar = \`echo \$histchars | cut -c1\`
  set _histchars = \$histchars
  alias module 'unset histchars; \\
eval \`$modules_bin/modulecmd tcsh '\$histchar'*\`; \\
set histchars = \$_histchars'
  unset histchar
else
  alias module 'eval \`$modules_bin/modulecmd tcsh \\!*\`'
endif

setenv MODULESHOME $modules_home

if (! \$?MODULEPATH ) then
  setenv MODULEPATH $modules_files
endif

if (! \$?LOADEDMODULES ) then
  setenv LOADEDMODULES
endif
!GROK!THIS!
: In the following dollars and backticks do not need the extra backslash.
$spitshell >>tcsh <<'!NO!SUBS!'
!NO!SUBS!
chmod 644 tcsh
$eunicefix tcsh
