Commit 6c0f919c authored by Maarten Litmaath's avatar Maarten Litmaath
Browse files

v1.8:

- Use the MonALISA production version on CVMFS by default.
parent 1639794c
#!/bin/bash
# JAliEn VObox Startup Scripts - MonaLisa
# v1.7 - 2021-10-20
# v1.8 - 2021-10-26
# Authors:
# Kalana Dananjaya <kwijethu@cern.ch>
# Costin Grigoras <Costin.Grigoras@cern.ch>
# Maarten Litmaath <Maarten.Litmaath@cern.ch>
monalisaDir=/cvmfs/alice.cern.ch/el7-x86_64/Packages/MonALISA
########################################################################################
# Write log to file
# Globals:
......@@ -321,7 +323,7 @@ function start_ml(){
envFile="$logDir/ml-env.sh"
commonConf="$confDir/version.properties"
mlEnv="$confDir/ml.env"
envCommand="/cvmfs/alice.cern.ch/bin/alienv printenv MonaLisa"
envCommand="/cvmfs/alice.cern.ch/bin/alienv printenv MonALISA"
> $setupLogFile
......@@ -401,7 +403,6 @@ function start_ml(){
curl -s -S -o "$HOME/$f" "http://alimonitor.cern.ch/download/MonaLisa/$f" &&
tar -xf "$HOME/$f" -C $HOME &&
perl -i.$$ -pe "s|^\s*(MONALISA_HOME)\s*=.*|\$1=$HOME/$d|i" "$commonConf" || exit 1
commonConfiguration[MONALISA_HOME]=$HOME/$d
......@@ -409,13 +410,26 @@ function start_ml(){
echo "export MonaLisa_HOME=${commonConfiguration[MONALISA_HOME]};" >> $envFile
else
# If a specific MonaLisa package is declared, use that package
if [[ -n "${commonConfiguration[MONALISA]}" ]]
# If a specific MonaLisa package is declared, use that, else the "pro" version
mlv=${commonConfiguration[MONALISA]:-pro}
monalisaVersion=$(
p=$monalisaDir/$mlv
(eval readlink "$p" || eval ls -ld "$p") | sed '$!d;s-.*/--'
)
if [[ -z "$monalisaVersion" ]]
then
envCommand="$envCommand/${commonConfiguration[MONALISA]}"
echo "Requested MonaLisa version '$mlv' could not be resolved"
return 1
fi
envCommand="$envCommand/$monalisaVersion"
$envCommand | grep ^ >> $envFile || exit 1
echo "export MonaLisa_HOME=$monalisaDir/$monalisaVersion;" >> $envFile
fi
source $envFile
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment