cvw/setup.csh
2024-07-04 13:45:24 -07:00

36 lines
1002 B
Tcsh
Executable File

#!/bin/csh
# setup.csh
# james.stine@okstate.edu 18 February 2023
echo "Executing Wally setup.csh"
# Extend alias which makes extending PATH much easier.
alias extend 'if (-d \!:2) if ("$\!:1" \!~ *"\!:2"*) setenv \!:1 ${\!:1}:\!:2;echo Added \!:2 to \!:1'
alias prepend 'if (-d \!:2) if ("$\!:1" \!~ *"\!:2"*) setenv \!:1 "\!:2":${\!:1};echo Added \!:2 to \!:1'
# Path to RISC-V Tools
if ( -e /opt/riscv ) then
setenv RISCV /opt/riscv
else if ( -e ~/riscv ) then
setenv RISCV ~/riscv
else
# set the $RISCV directory here and remove the subsequent two lines
# setenv RISCV
echo "\$RISCV directory not found. Checked /opt/riscv and ~/riscv. Edit setup.csh to point to your custom \$RISCV directory."
exit 1;
endif
echo \$RISCV set to "${RISCV}"
# Path to Wally repository
setenv WALLY $PWD
echo '$WALLY set to ' ${WALLY}
# utility functions in Wally repository
extend PATH $WALLY/bin
# load site licenses and tool locations
source $RISCV/site-setup.csh
echo "setup done"