MYSHELL XCOMM NCL.CSH -- Startup the version of the CL executable compiled for the XCOMM architecture or floating point hardware appropriate for the current XCOMM machine. XCOMM XCOMM Taken loosely from ASSIST.CSH by E. Mandel, 7/92 XCOMM XCOMM initialize SAORD variables if ( $?SAORD_ROOT == 0 ) then setenv SAORD_ROOT HERE endif if ( -e ${SAORD_ROOT}/xpa1 ) then setenv XPA_VERSION 1 else setenv XPA_VERSION 2 endif if ( $?SAORD_BIN == 0 ) then setenv SAORD_BIN ${SAORD_ROOT}/bin.`${SAORD_ROOT}/getarch` endif if ( $?SAORD_TMPDIR == 0 ) then setenv SAORD_TMPDIR /tmp endif setenv SAORD_VERSION "`cat ${SAORD_ROOT}/VERSION`" XCOMM end of SAORD initialization XCOMM make sure we have the program if ( $?CLEXE == 0 ) then setenv CLEXE ${SAORD_BIN}/ncl.e else echo "Using alternate IRAF ncl.e program: ${CLEXE}" endif if (! -e $CLEXE) then echo " " echo "Warning: could not find '$CLEXE' ... " echo "Switching to the NOAO-supplied IRAF cl ..." echo " " exec cl endif XCOMM IRAF requires these to be set ... set ERR1 = "The ncl requires the 'iraf' and 'IRAFARCH' environment variables to be set." set ERR2 = "'iraf' points to the IRAF installation directory (e.g. /usr/iraf/)." set ERR3 = "'IRAFARCH' is the IRAF architecture type (e.g. sparc)." set ERR4 = "Your system manager or IRAF installer can help you determine the" set ERR5 = "proper values for these variables. Set them in your .login file." set ERR6 = "Please try again ..." if ( ( $?iraf == 0 ) || ( $?IRAFARCH == 0 ) ) then echo "" echo $ERR1 echo "" echo $ERR2 echo $ERR3 echo "" echo $ERR4 echo $ERR5 echo "" echo $ERR6 echo "" exit(1) else setenv arch .$IRAFARCH setenv IRAFBIN ${iraf}bin$arch/ if ( $?host == 0 ) setenv host "${iraf}unix/" if ( $?hbin == 0 ) setenv hbin "${host}bin/" if ( $?hlib == 0 ) setenv hlib "${host}hlib/" endif XCOMM Make sure we can find the IRAF system ... set ERR1 = "We could not find the IRAF system directory: $IRAFBIN." set ERR2 = "Please check the value of the 'iraf' and 'IRAFARCH' environment" set ERR3 = "variables (which make up this dir name) and try again." if ( ! -d $IRAFBIN ) then echo "" echo $ERR1 echo "" echo $ERR2 echo $ERR3 echo "" exit(1) endif XCOMM Try to get to the right place for the user ... set ERR1 = "Please set the UPARM variable to your uparm dir or restart in your IRAF dir." if ( "1" == "1" ) then if (-e login.cl) then if ($?UPARM == 0) then if ( -d ./uparm ) then setenv UPARM `pwd`/uparm/ echo "Setting UPARM environment variable to $UPARM ..." else echo $ERR1 exit(1) endif endif else if ($?UPARM != 0) then if (-e $UPARM/../login.cl) then cd $UPARM/.. echo "Changing current dir to `pwd` ..." else echo "No login.cl was found and the UPARM variable did not point to its location." echo $ERR1 exit(1) endif else echo "No login.cl was found and no UPARM variable was available to guess its location." echo $ERR1 exit(1) endif endif XCOMM this version of the cl absolutely requires that the EDITOR variable is set XCOMM might as well make it emacs if ($?EDITOR == 0) then setenv EDITOR emacs endif XCOMM look for the CLTTYSIZE progam if (-e ${SAORD_BIN}/ttysize) then setenv CLTTYSIZE ${SAORD_BIN}/ttysize else setenv CLTTYSIZE NONE endif XCOMM This is what is was all about ... exec $CLEXE