I would like to be able to source a file to set up some environment variables, but do it so it's independent of the shell being used.
For example
%: source START.env
# START.env
if [ $SHELL == "bash" ]; then
source START.env.bash # sets environment variables
else
source START.env.tcsh # sets environment variables
fi
However, this code will only work for bash. How can one make it compatible with both bash and tcsh?
I have to source the file because I want the environment variables to stick afterwards.