Overhaul the installation and detection mechanisms

This commit is contained in:
2026-06-22 09:47:14 -04:00
parent cab9f98ef9
commit 8db7a5a13e
3 changed files with 89 additions and 54 deletions
+23 -14
View File
@@ -1,14 +1,33 @@
# This file will always be taken in. .login is now
# vestigial, and doesn't matter if first or second.
# These are the bits that would be in login:
# Reset the CSHENV_DIR
# (TODO: Downgrade this from environment variable to shell variable)
unsetenv CSHENV_DIR
if( ! $?CSHENV_DIR ) then
setenv CSHENV_DIR ~/cshenv
if( $?CSHENV_DEBUG ) then
echo "CSHENV_DIR is not set. Guessing it based upon "'${1}'": ${1}"
endif
# Done twice to strip out the hooks dir and the hook itself.
setenv CSHENV_DIR ${1}_
setenv CSHENV_DIR `dirname ${CSHENV_DIR}`
setenv CSHENV_DIR `dirname ${CSHENV_DIR}`
if( $?CSHENV_DEBUG ) then
echo "CSHENV_DIR is auto set to ${CSHENV_DIR}"
endif
if( "." == $#CSHENV_DIR ) then
if( $?CSHENV_DEBUG ) then
echo "CSHENV_DIR is still not set. Using guessed default."
endif
set cshenv_fallback_dir
setenv CSHENV_DIR ~/cshenv
endif
endif
if( $?CSHENV_DEBUG ) then
echo "Set CSHENV_DIR to: " ${CSHENV_DIR}
echo "Set (in tcshrc hook) CSHENV_DIR to: " ${CSHENV_DIR}
endif
setenv LC_NUMERIC en_US.UTF-8
@@ -25,16 +44,6 @@ if( $?CSHENV_DEBUG ) then
echo "Starting tcshrc..."
endif
#if( -z ${_} ) then
#echo $0
#setenv CSHENV_TCSHRC_PATH $0
#else
#echo ${_}
#setenv CSHENV_TCSHRC_PATH "${_}"
#endif
#echo tcshrc hook lives at: ${CSHENV_TCSHRC_PATH}
if( -c `tty` ) then
if( $?CSHENV_DEBUG ) then
echo "Going to source core tcshrc..."