-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathb2setup
More file actions
27 lines (25 loc) · 809 Bytes
/
b2setup
File metadata and controls
27 lines (25 loc) · 809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#
# wrapper to source either b2setup.sh or b2setup.csh
#
# sh type shells
test "`ps -p $$ -o comm= | grep csh | wc -l`" = "0" && . `dirname $(readlink -f ${BASH_SOURCE:-$0})`/b2setup.sh
test "`ps -p $$ -o comm= | grep csh | wc -l`" = "0" && return
# tcsh shell
set COMMAND=`echo $_`
if ( "${COMMAND}" != "" ) then
set FILENAME=`echo ${COMMAND} | awk '{print $2}'`
else if ( $?BELLE2_TOOLS ) then
set FILENAME=${BELLE2_TOOLS}/b2setup
else if ( $?VO_BELLE2_SW_DIR ) then
set FILENAME=${VO_BELLE2_SW_DIR}/tools/b2setup
else if ( -f ${HOME}/tools/b2setup ) then
set FILENAME=${HOME}/tools/b2setup
else if ( -f tools/b2setup ) then
set FILENAME=tools/b2setup
else if ( -f b2setup ) then
set FILENAME=b2setup
else
echo "No tools folder found"
exit 1
endif
source `dirname ${FILENAME}`/b2setup.csh