Skip to content
Snippets Groups Projects
Commit fd250d8a authored by Orgis, Dr. Thomas's avatar Orgis, Dr. Thomas
Browse files

build_lofar: lofar_prefix properly in init.sh, no arg parsing in config

It was a bad idea to have the config snipped take $1 for lofar_prefix,
or anything. Since we source the same code again in init.sh, no
references to the build_lofar.sh command line are allowed. The
config needs to be self-contained in that respect.

So the build_lofar.sh script now has the prefix always as first
mandatory argument itself, and optionally the config file to use
as second.
parent 86a546e0
Branches
No related tags found
No related merge requests found
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
# fetch/patch/build code # fetch/patch/build code
mandatory_vars="\ mandatory_vars="\
lofar_prefix Installation prefix to use. Packages are put into sub-directories of that.
casacore_version Version of CASAcore. casacore_version Version of CASAcore.
pycasa_version Version of CASAcore Python bindings. pycasa_version Version of CASAcore Python bindings.
dysco_version Version of Dysco. dysco_version Version of Dysco.
...@@ -35,7 +34,17 @@ CPATH Path list for C/C++ include file search. ...@@ -35,7 +34,17 @@ CPATH Path list for C/C++ include file search.
idg_mkl Passed on to idg BUILD_WITH_MKL idg_mkl Passed on to idg BUILD_WITH_MKL
" "
if test $# -lt 1; then
echo "$0: Please provide the installation prefix as mandatory argument."
exit 1
fi
lofar_prefix=$1; shift
if test $# -ge 1; then
config=$1; shift
else
config=$0.config config=$0.config
fi
if ! test -e "$config"; then if ! test -e "$config"; then
cat <<EOT cat <<EOT
...@@ -46,7 +55,8 @@ Please create/link an appropriate config script named ...@@ -46,7 +55,8 @@ Please create/link an appropriate config script named
$config $config
. It should load the correct environment for the site, possibly (or any other name you provide as second argument).
It should load the correct environment for the site, possibly
using environment modules or just setting variables for paths using environment modules or just setting variables for paths
and compilers directly. It also has to set up PATH so that the and compilers directly. It also has to set up PATH so that the
desired python interpreter is directly available as the command desired python interpreter is directly available as the command
...@@ -676,6 +686,9 @@ print_init() ...@@ -676,6 +686,9 @@ print_init()
# #
# Step 1: The build config with all variables used. # Step 1: The build config with all variables used.
# #
lofar_prefix='$lofar_prefix'
EOT EOT
cat $config cat $config
cat <<EOT cat <<EOT
......
# The setup on the Hamburg LOFAR GPU Cluster. # The setup on the Hamburg LOFAR GPU Cluster.
lofar_prefix=$1 # Give installation directory as first argument.
aoflagger_version=2.14.0 aoflagger_version=2.14.0
casacore_version=latest casacore_version=latest
dysco_version=1.2.0 dysco_version=1.2.0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment