SOLARIS_Analysis/SOLARIS.sh

37 lines
709 B
Bash
Raw Normal View History

2023-03-31 16:08:06 -04:00
#========== this script define the SOLARISANADIR as global env.
unset SOLARISANADIR
2023-03-28 17:09:58 -04:00
SOURCE=${BASH_ARGV[0]}
PCName=$(uname -n)
if [ $(uname -n) == "solaris-daq" ]; then
2023-03-31 16:08:06 -04:00
SOLARISANADIR=~/Analysis
2023-03-28 17:09:58 -04:00
else
if [ $(pwd) == $HOME ]; then
2023-03-31 16:08:06 -04:00
SOLARISANADIR=$(dirname ${SOURCE})
2023-03-28 17:09:58 -04:00
2023-03-31 16:08:06 -04:00
if [[ ${SOLARISANADIR} == *"$HOME"* ]]; then
2023-03-28 17:09:58 -04:00
dummpy=0
else
2023-03-31 16:08:06 -04:00
SOLARISANADIR=${HOME}/$SOLARISANADIR
2023-03-28 17:09:58 -04:00
fi
else
2023-03-31 16:08:06 -04:00
SOLARISANADIR=$(pwd)
2023-03-28 17:09:58 -04:00
fi
fi
2023-03-31 16:08:06 -04:00
export SOLARISANADIR
echo "####### set global variable SOLARISANADIR = ${SOLARISANADIR}"
export PATH=$PATH:$SOLARISANADIR/armory
echo "####### add ${SOLARISANADIR}/armory into PATH"
###########################
alias 2Working='cd ${SOLARISANADIR}/working'