All the debugging I could find.
This commit is contained in:
+18
-51
@@ -1,15 +1,11 @@
|
||||
if( $?CSHENV_DEBUG ) then
|
||||
echo "Sourcing tcshrc.system.common"
|
||||
endif
|
||||
_debug "Sourcing tcshrc.system.common"
|
||||
|
||||
set uname=`uname`
|
||||
set uname_a=`uname -a`
|
||||
set uname_p=`uname -p`
|
||||
set uname_m=`uname -m`
|
||||
|
||||
if( $?CSHENV_DEBUG ) then
|
||||
echo "Setting uname -i tracker, based upon OS."
|
||||
endif
|
||||
_debug "Setting uname -i tracker, based upon OS."
|
||||
|
||||
switch( ${CSHENV_SYSTEM} )
|
||||
case Cygwin:
|
||||
@@ -27,48 +23,37 @@ switch( ${CSHENV_SYSTEM} )
|
||||
breaksw
|
||||
endsw
|
||||
|
||||
if( $?CSHENV_DEBUG ) then
|
||||
echo "Setting CSHENV_BASESYSTEM..."
|
||||
endif
|
||||
_debug "Setting CSHENV_BASESYSTEM..."
|
||||
setenv CSHENV_BASESYSTEM "${uname}"
|
||||
|
||||
if( $?CSHENV_DEBUG ) then
|
||||
echo "Setting CSHENV_FULLSYSTEM..."
|
||||
endif
|
||||
_debug "Setting CSHENV_FULLSYSTEM..."
|
||||
setenv CSHENV_FULLSYSTEM "${uname_a}"
|
||||
_debug "Done setting CSHENV_FULLSYSTEM..."
|
||||
|
||||
switch ( ${CSHENV_SYSTEM} )
|
||||
|
||||
case Cygwin:
|
||||
if( $?CSHENV_DEBUG ) then
|
||||
echo "Using a Cygwin system..."
|
||||
endif
|
||||
_debug "Using a Cygwin system..."
|
||||
|
||||
#Cygwin is like Linux, so we just...
|
||||
|
||||
#FALLTHROUGH
|
||||
|
||||
case Linux:
|
||||
if( $?CSHENV_DEBUG ) then
|
||||
echo "Using a Linux-like system (GLIBC, probably)..."
|
||||
endif
|
||||
_debug "Using a Linux-like system (GLIBC, probably)..."
|
||||
|
||||
setenv CSHENV_CPU "${uname_m}"
|
||||
setenv CSHENV_MACH "${uname_p}"
|
||||
|
||||
switch( CSHENV_CPU )
|
||||
case m68k:
|
||||
if( $?CSHENV_DEBUG ) then
|
||||
echo "Running on a m68k based CPU, tweaks for system."
|
||||
endif
|
||||
_debug "Running on a m68k based CPU, tweaks for system."
|
||||
|
||||
setenv CSHENV_ARCH ${uname_p}
|
||||
breaksw
|
||||
|
||||
case armv71:
|
||||
if( $?CSHENV_DEBUG ) then
|
||||
echo "Running on an arm based CPU, tweaks for system."
|
||||
endif
|
||||
_debug "Running on an arm based CPU, tweaks for system."
|
||||
setenv CSHENV_ARCH arm
|
||||
breaksw
|
||||
|
||||
@@ -80,9 +65,7 @@ switch ( ${CSHENV_SYSTEM} )
|
||||
breaksw
|
||||
|
||||
case Darwin:
|
||||
if( $?CSHENV_DEBUG ) then
|
||||
echo "Using a Darwin/MacosX system..."
|
||||
endif
|
||||
_debug "Using a Darwin/MacosX system..."
|
||||
|
||||
setenv CSHENV_CPU ${uname_p}
|
||||
setenv CSHENV_MACH ${uname_m}
|
||||
@@ -92,9 +75,7 @@ switch ( ${CSHENV_SYSTEM} )
|
||||
breaksw
|
||||
|
||||
case FreeBSD:
|
||||
if( $?CSHENV_DEBUG ) then
|
||||
echo "Using a FreeBSD system..."
|
||||
endif
|
||||
_debug "Using a FreeBSD system..."
|
||||
|
||||
setenv CSHENV_CPU ${uname_p}
|
||||
setenv CSHENV_MACH ${uname_m}
|
||||
@@ -108,56 +89,42 @@ switch ( ${CSHENV_SYSTEM} )
|
||||
breaksw
|
||||
endsw
|
||||
|
||||
if( $?CSHENV_DEBUG ) then
|
||||
echo "Detecting hostname hacks needed."
|
||||
endif
|
||||
_debug "Detecting hostname hacks needed."
|
||||
|
||||
switch( ${CSHENV_SYSTEM} )
|
||||
|
||||
#Broken or Non-BSD like hostname commands:
|
||||
case Cygwin:
|
||||
case SunOS:
|
||||
if( $?CSHENV_DEBUG ) then
|
||||
echo "SYSV hostname hack."
|
||||
endif
|
||||
_debug "SYSV hostname hack."
|
||||
|
||||
setenv CSHENV_HOSTNAME `hostname | tr "[:upper:]" "[:lower:]"`
|
||||
breaksw
|
||||
|
||||
#Linux may be different, yet still
|
||||
case Linux:
|
||||
if( $?CSHENV_DEBUG ) then
|
||||
echo "BSD-like hostname hack."
|
||||
endif
|
||||
_debug "BSD-like hostname hack."
|
||||
|
||||
setenv CSHENV_HOSTNAME `hostname | tr "[:upper:]" "[:lower:]"`
|
||||
breaksw
|
||||
|
||||
#BSD like hostnames, and non-broken ones.
|
||||
default:
|
||||
if( $?CSHENV_DEBUG ) then
|
||||
echo "BSD-like hostname hack."
|
||||
endif
|
||||
_debug "BSD-like hostname hack."
|
||||
|
||||
setenv CSHENV_HOSTNAME `hostname -s| tr "[:upper:]" "[:lower:]"`
|
||||
breaksw
|
||||
endsw
|
||||
|
||||
if( $?CSHENV_DEBUG ) then
|
||||
echo "Hostname detected as ${CSHENV_HOSTNAME}..."
|
||||
endif
|
||||
_debug "Hostname detected as ${CSHENV_HOSTNAME}..."
|
||||
|
||||
if( $?CSHENV_VIRTUAL_HOSTNAME ) then
|
||||
setenv CSHENV_HOSTNAME ${CSHENV_VIRTUAL_HOSTNAME}
|
||||
if( $?CSHENV_DEBUG ) then
|
||||
echo "Hostname overriden as ${CSHENV_HOSTNAME}..."
|
||||
endif
|
||||
_debug "Hostname overriden as ${CSHENV_HOSTNAME}..."
|
||||
endif
|
||||
|
||||
|
||||
if( $?CSHENV_DEBUG ) then
|
||||
echo "Done sourcing tcshrc.system.common"
|
||||
endif
|
||||
_debug "Done sourcing tcshrc.system.common"
|
||||
|
||||
###########################
|
||||
# vim: ft=tcsh
|
||||
|
||||
Reference in New Issue
Block a user