1 # this script must be sourced
5 echo
"USAGE: source grid_setup.sh <product_dir>"
6 echo
" sets up all ups products found in <product_dir>"
8 echo
" This script is designed to be used when copying a localProducts directory"
9 echo
" to the grid for testing."
10 echo
" DO NOT setup mrb when using this script."
17 if (( $? == 0 )); then
20 echo
"bash source $BASH_SOURCE"
21 reldir=`dirname
"$BASH_SOURCE"`
22 thisdir=`
cd ${reldir} && /
bin/pwd ${pwd_P_arg}`
27 test $?shell = 1 && set ss=csh || ss=sh
28 echo Shell
type is $ss.
32 echo
"ERROR: please specify the product directory"
37 if [ -
n "${MRB_BUILDDIR}" ]; then
38 echo
"ERROR: the mrb development environment is enabled."
39 echo
"ERROR: please run this script in a clean environment."
42 if [ -
n "${MRB_SOURCE}" ]; then
43 echo
"ERROR: the mrb development environment is enabled."
44 echo
"ERROR: please run this script in a clean environment."
50 echo
"ERROR: cannot find ${MRB_INSTALL}"
59 echo
"ERROR: please setup ups"
70 tmpfl=/tmp/`basename $localP`_setup_$$$$
73 echo
"## checking $localP for products" >> $tmpfl
74 echo
"source \`${UPS_DIR}/bin/ups setup ${SETUP_UPS}\`" >> $tmpfl
76 # deal with UPS_OVERRIDE
77 echo
"# incoming UPS_OVERRIDE $UPS_OVERRIDE" >> $tmpfl
78 if [ -
z "${UPS_OVERRIDE}" ]; then
82 new_override=
"-B ${tempover}"
84 echo
"export UPS_OVERRIDE=\"${new_override}\"" >> $tmpfl
86 ups
list -aK+ -
z $localP |
while read line
88 ##echo "got line: $line"
89 words=($(echo
$line | tr
" " "\n"))
90 ##echo "split into ${#words[@]} pieces"
91 product=$(echo ${words[0]} | tr
"\"" " ")
92 version=$(echo ${words[1]} | tr
"\"" " ")
93 quals=$(echo ${words[3]} | tr
"\"" " ")
94 product_uc=$(echo ${product} | tr
'[a-z]' '[A-z]')
95 echo
"product_setup=\$(printenv | grep SETUP_${product_uc} | wc -l)" >> $tmpfl
96 echo
"if [[ \"\${product_setup}\" > 0 ]]; then" >> $tmpfl
97 echo
"unsetup -j $product" >> $tmpfl
101 cmd=
"setup -B $product $version"
103 pq=+`echo ${
quals} | sed -
e 's/:/:+/g'`
104 cmd=
"setup -B $product $version -q $pq"
106 echo
"$cmd -z $localP:${PRODUCTS}" >> $tmpfl
109 echo
"ready to source $tmpfl"
process_name opflash particleana ie ie ie z
then source grid fermiapp products dune setup_dune_fermiapp sh exit else echo No setup file found exit fi setup
constexpr details::BinObj< T > bin(T value)
Returns a wrapper to print the specified data in binary format.
BEGIN_PROLOG hitmakerfive clustermakerfour pfparticlemakerthree showermakertwo END_PROLOG hitmakerfive clustermakerfour pfparticlemakerthree sequence::inline_paths sequence::inline_paths sequence::inline_paths showermakers test