From 78d1f9d0bb51911da8d13279db609665e9accf42 Mon Sep 17 00:00:00 2001
From: Anne Tipka <anne.tipka@ctbto.org>
Date: Thu, 20 Oct 2022 20:43:44 +0000
Subject: [PATCH] backup for Reading setup files; linking old setup file names
 to Bologna versions

---
 setup.sh               |  96 +------------------------------------
 setup_local.sh         | 104 +----------------------------------------
 setup_local_reading.sh | 103 ++++++++++++++++++++++++++++++++++++++++
 setup_reading.sh       |  95 +++++++++++++++++++++++++++++++++++++
 4 files changed, 200 insertions(+), 198 deletions(-)
 mode change 100755 => 120000 setup.sh
 mode change 100755 => 120000 setup_local.sh
 create mode 100755 setup_local_reading.sh
 create mode 100755 setup_reading.sh

diff --git a/setup.sh b/setup.sh
deleted file mode 100755
index a4c3a4a..0000000
--- a/setup.sh
+++ /dev/null
@@ -1,95 +0,0 @@
-#!/bin/bash
-#
-# @Author: Anne Philipp
-#
-# @Date: September, 10 2018
-#
-# @Description: 
-#    This file defines the flex_extract's available installation
-#    parameters and puts them together for the call of the actual 
-#    python installation script. It also does some checks to 
-#    guarantee necessary parameters were set.
-#
-# @Licence:
-#    (C) Copyright 2014-2020.
-#
-#    SPDX-License-Identifier: CC-BY-4.0
-#
-#    This work is licensed under the Creative Commons Attribution 4.0
-#    International License. To view a copy of this license, visit
-#    http://creativecommons.org/licenses/by/4.0/ or send a letter to
-#    Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
-#
-# -----------------------------------------------------------------
-# AVAILABLE COMMANDLINE ARGUMENTS TO SET
-#
-# THE USER HAS TO SPECIFY THESE PARAMETERS
-#
-TARGET='ecgate'
-MAKEFILE='makefile_ecgate'
-ECUID='<username>'
-ECGID='<groupID>'
-GATEWAY='<gatewayname>'
-DESTINATION='<username>@genericSftp'
-INSTALLDIR=None
-JOB_TEMPLATE=''
-CONTROLFILE='CONTROL_EA5'
-# -----------------------------------------------------------------
-#
-# AFTER THIS LINE THE USER DOES NOT HAVE TO CHANGE ANYTHING !!!
-#
-# -----------------------------------------------------------------
-
-# PATH TO INSTALLATION SCRIPT
-script="Source/Python/install.py"
-
-# INITIALIZE EMPTY PARAMETERLIST
-parameterlist=""
-
-# CHECK IF ON ECMWF SERVER; 
-if [[ $HOST == *"ecgb"* ]] || [[ $HOST == *"cca"* ]] || [[ $HOST == *"ccb"* ]]; then
-# LOAD PYTHON3 MODULE
-  module load python3
-fi 
-
-# DEFAULT PARAMETERLIST
-if [ -n "$TARGET" ]; then
-  parameterlist=" --target=$TARGET"
-else
-  echo "ERROR: No installation target specified."
-  echo "EXIT WITH ERROR"
-  exit
-fi
-
-# CHECK FOR MORE PARAMETER 
-if [ "$TARGET" == "ecgate" ] || [ "$TARGET" == "cca" ] || [ "$TARGET" == "ccb" ]; then
-  # check if necessary Parameters are set
-  if [ -z "$ECUID" ] || [ -z "$ECGID" ] || [ "$ECUID" == "<username>" ] || [ "$ECGID" == "<groupID>" ] ; then
-    echo "ERROR: At least one of the following parameters are not properly set: ECUID or ECGID!"
-    echo "EXIT WITH ERROR"
-    exit
-  else
-    parameterlist+=" --ecuid=$ECUID --ecgid=$ECGID --gateway=$GATEWAY --destination=$DESTINATION"
-  fi
-  if [ -z "$GATEWAY" ] || [ -z "$DESTINATION" ] || [ "$GATEWAY" == "<gatewayname>" ] || [ "$DESTINATION" == "<username>@genericSftp" ] ; then
-    echo "WARNING: Not setting parameters GATEWAY and DESTINATION means there will be no file transfer to local gateway server."
-  fi
-fi
-if [ -n "$MAKEFILE" ]; then
-  parameterlist+=" --makefile=$MAKEFILE"
-fi
-if [ -n "$FLEXPARTDIR" ]; then # not empty
-  parameterlist+=" --flexpartdir=$FLEXPARTDIR"
-fi
-if [ -n "$JOB_TEMPLATE" ]; then
-  parameterlist+=" --job_template=$JOB_TEMPLATE"
-fi
-if [ -n "$CONTROLFILE" ]; then
-  parameterlist+=" --controlfile=$CONTROLFILE"
-fi
-
-# -----------------------------------------------------------------
-# CALL INSTALLATION SCRIPT WITH DETERMINED COMMANDLINE ARGUMENTS
-
-$script $parameterlist
-
diff --git a/setup.sh b/setup.sh
new file mode 120000
index 0000000..5641a82
--- /dev/null
+++ b/setup.sh
@@ -0,0 +1 @@
+setup_bologna.sh
\ No newline at end of file
diff --git a/setup_local.sh b/setup_local.sh
deleted file mode 100755
index 776e482..0000000
--- a/setup_local.sh
+++ /dev/null
@@ -1,103 +0,0 @@
-#!/bin/bash
-#
-# @Author: Anne Philipp
-#
-# @Date: September, 10 2018
-#
-# @Description: 
-#    This file defines the flex_extract's available installation
-#    parameters and puts them together for the call of the actual 
-#    python installation script. It also does some checks to 
-#    guarantee necessary parameters were set.
-#
-# @History:
-#    Leopold Haimberger; Aug 2020
-#       added new parameter for a system installation 
-#       (seperate executable and user directories)
-#
-# @Licence:
-#    (C) Copyright 2014-2020.
-#
-#    SPDX-License-Identifier: CC-BY-4.0
-#
-#    This work is licensed under the Creative Commons Attribution 4.0
-#    International License. To view a copy of this license, visit
-#    http://creativecommons.org/licenses/by/4.0/ or send a letter to
-#    Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
-#
-# -----------------------------------------------------------------
-# AVAILABLE COMMANDLINE ARGUMENTS TO SET
-#
-# THE USER HAS TO SPECIFY THESE PARAMETERS
-#
-TARGET='local'
-MAKEFILE='makefile_local_gfortran'
-ECUID='<username>'
-ECGID='<groupID>'
-GATEWAY='<gatewayname>'
-DESTINATION='<name>@genericSftp'
-INSTALLDIR=None
-SYSINSTALLDIR=None
-JOB_TEMPLATE=''
-CONTROLFILE='CONTROL_CERA'
-# -----------------------------------------------------------------
-#
-# AFTER THIS LINE THE USER DOES NOT HAVE TO CHANGE ANYTHING !!!
-#
-# -----------------------------------------------------------------
-
-# PATH TO INSTALLATION SCRIPT
-script="Source/Python/install.py"
-
-# INITIALIZE EMPTY PARAMETERLIST
-parameterlist=""
-
-# CHECK IF ON ECMWF SERVER; 
-if [[ $HOST == *"ecgb"* ]] || [[ $HOST == *"cca"* ]] || [[ $HOST == *"ccb"* ]]; then
-# LOAD PYTHON3 MODULE
-  module load python3
-fi 
-
-# DEFAULT PARAMETERLIST
-if [ -n "$TARGET" ]; then
-  parameterlist=" --target=$TARGET"
-else
-  echo "ERROR: No installation target specified."
-  echo "EXIT WITH ERROR"
-  exit
-fi
-
-# CHECK FOR MORE PARAMETER 
-if [ "$TARGET" == "ecgate" ] || [ "$TARGET" == "cca" ]; then
-  # check if necessary Parameters are set
-  if [ -z "$ECUID" ] || [ -z "$ECGID" ] || [ -z "$GATEWAY" ] || [ -z "$DESTINATION" ]; then
-    echo "ERROR: At least one of the following parameters are not set: ECUID, ECGID, GATEWAY, DESTINATION!"
-    echo "EXIT WITH ERROR"
-    exit
-  else
-    parameterlist+=" --ecuid=$ECUID --ecgid=$ECGID --gateway=$GATEWAY --destination=$DESTINATION"
-  fi
-fi
-if [ -n "$MAKEFILE" ]; then
-  parameterlist+=" --makefile=$MAKEFILE"
-fi
-if [ -n "$INSTALLDIR" ]; then 
-  parameterlist+=" --installdir=$INSTALLDIR"
-fi
-if [ -n "$SYSINSTALLDIR" ]; then 
-  parameterlist+=" --sysinstalldir=$SYSINSTALLDIR"
-fi
-if [ -n "$JOB_TEMPLATE" ]; then
-  parameterlist+=" --job_template=$JOB_TEMPLATE"
-fi
-if [ -n "$CONTROLFILE" ]; then
-  parameterlist+=" --controlfile=$CONTROLFILE"
-fi
-
-# -----------------------------------------------------------------
-# CALL INSTALLATION SCRIPT WITH DETERMINED COMMANDLINE ARGUMENTS
-
-$script $parameterlist
-
-
-
diff --git a/setup_local.sh b/setup_local.sh
new file mode 120000
index 0000000..f2a1f12
--- /dev/null
+++ b/setup_local.sh
@@ -0,0 +1 @@
+setup_local_bologna.sh
\ No newline at end of file
diff --git a/setup_local_reading.sh b/setup_local_reading.sh
new file mode 100755
index 0000000..776e482
--- /dev/null
+++ b/setup_local_reading.sh
@@ -0,0 +1,103 @@
+#!/bin/bash
+#
+# @Author: Anne Philipp
+#
+# @Date: September, 10 2018
+#
+# @Description: 
+#    This file defines the flex_extract's available installation
+#    parameters and puts them together for the call of the actual 
+#    python installation script. It also does some checks to 
+#    guarantee necessary parameters were set.
+#
+# @History:
+#    Leopold Haimberger; Aug 2020
+#       added new parameter for a system installation 
+#       (seperate executable and user directories)
+#
+# @Licence:
+#    (C) Copyright 2014-2020.
+#
+#    SPDX-License-Identifier: CC-BY-4.0
+#
+#    This work is licensed under the Creative Commons Attribution 4.0
+#    International License. To view a copy of this license, visit
+#    http://creativecommons.org/licenses/by/4.0/ or send a letter to
+#    Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
+#
+# -----------------------------------------------------------------
+# AVAILABLE COMMANDLINE ARGUMENTS TO SET
+#
+# THE USER HAS TO SPECIFY THESE PARAMETERS
+#
+TARGET='local'
+MAKEFILE='makefile_local_gfortran'
+ECUID='<username>'
+ECGID='<groupID>'
+GATEWAY='<gatewayname>'
+DESTINATION='<name>@genericSftp'
+INSTALLDIR=None
+SYSINSTALLDIR=None
+JOB_TEMPLATE=''
+CONTROLFILE='CONTROL_CERA'
+# -----------------------------------------------------------------
+#
+# AFTER THIS LINE THE USER DOES NOT HAVE TO CHANGE ANYTHING !!!
+#
+# -----------------------------------------------------------------
+
+# PATH TO INSTALLATION SCRIPT
+script="Source/Python/install.py"
+
+# INITIALIZE EMPTY PARAMETERLIST
+parameterlist=""
+
+# CHECK IF ON ECMWF SERVER; 
+if [[ $HOST == *"ecgb"* ]] || [[ $HOST == *"cca"* ]] || [[ $HOST == *"ccb"* ]]; then
+# LOAD PYTHON3 MODULE
+  module load python3
+fi 
+
+# DEFAULT PARAMETERLIST
+if [ -n "$TARGET" ]; then
+  parameterlist=" --target=$TARGET"
+else
+  echo "ERROR: No installation target specified."
+  echo "EXIT WITH ERROR"
+  exit
+fi
+
+# CHECK FOR MORE PARAMETER 
+if [ "$TARGET" == "ecgate" ] || [ "$TARGET" == "cca" ]; then
+  # check if necessary Parameters are set
+  if [ -z "$ECUID" ] || [ -z "$ECGID" ] || [ -z "$GATEWAY" ] || [ -z "$DESTINATION" ]; then
+    echo "ERROR: At least one of the following parameters are not set: ECUID, ECGID, GATEWAY, DESTINATION!"
+    echo "EXIT WITH ERROR"
+    exit
+  else
+    parameterlist+=" --ecuid=$ECUID --ecgid=$ECGID --gateway=$GATEWAY --destination=$DESTINATION"
+  fi
+fi
+if [ -n "$MAKEFILE" ]; then
+  parameterlist+=" --makefile=$MAKEFILE"
+fi
+if [ -n "$INSTALLDIR" ]; then 
+  parameterlist+=" --installdir=$INSTALLDIR"
+fi
+if [ -n "$SYSINSTALLDIR" ]; then 
+  parameterlist+=" --sysinstalldir=$SYSINSTALLDIR"
+fi
+if [ -n "$JOB_TEMPLATE" ]; then
+  parameterlist+=" --job_template=$JOB_TEMPLATE"
+fi
+if [ -n "$CONTROLFILE" ]; then
+  parameterlist+=" --controlfile=$CONTROLFILE"
+fi
+
+# -----------------------------------------------------------------
+# CALL INSTALLATION SCRIPT WITH DETERMINED COMMANDLINE ARGUMENTS
+
+$script $parameterlist
+
+
+
diff --git a/setup_reading.sh b/setup_reading.sh
new file mode 100755
index 0000000..a4c3a4a
--- /dev/null
+++ b/setup_reading.sh
@@ -0,0 +1,95 @@
+#!/bin/bash
+#
+# @Author: Anne Philipp
+#
+# @Date: September, 10 2018
+#
+# @Description: 
+#    This file defines the flex_extract's available installation
+#    parameters and puts them together for the call of the actual 
+#    python installation script. It also does some checks to 
+#    guarantee necessary parameters were set.
+#
+# @Licence:
+#    (C) Copyright 2014-2020.
+#
+#    SPDX-License-Identifier: CC-BY-4.0
+#
+#    This work is licensed under the Creative Commons Attribution 4.0
+#    International License. To view a copy of this license, visit
+#    http://creativecommons.org/licenses/by/4.0/ or send a letter to
+#    Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
+#
+# -----------------------------------------------------------------
+# AVAILABLE COMMANDLINE ARGUMENTS TO SET
+#
+# THE USER HAS TO SPECIFY THESE PARAMETERS
+#
+TARGET='ecgate'
+MAKEFILE='makefile_ecgate'
+ECUID='<username>'
+ECGID='<groupID>'
+GATEWAY='<gatewayname>'
+DESTINATION='<username>@genericSftp'
+INSTALLDIR=None
+JOB_TEMPLATE=''
+CONTROLFILE='CONTROL_EA5'
+# -----------------------------------------------------------------
+#
+# AFTER THIS LINE THE USER DOES NOT HAVE TO CHANGE ANYTHING !!!
+#
+# -----------------------------------------------------------------
+
+# PATH TO INSTALLATION SCRIPT
+script="Source/Python/install.py"
+
+# INITIALIZE EMPTY PARAMETERLIST
+parameterlist=""
+
+# CHECK IF ON ECMWF SERVER; 
+if [[ $HOST == *"ecgb"* ]] || [[ $HOST == *"cca"* ]] || [[ $HOST == *"ccb"* ]]; then
+# LOAD PYTHON3 MODULE
+  module load python3
+fi 
+
+# DEFAULT PARAMETERLIST
+if [ -n "$TARGET" ]; then
+  parameterlist=" --target=$TARGET"
+else
+  echo "ERROR: No installation target specified."
+  echo "EXIT WITH ERROR"
+  exit
+fi
+
+# CHECK FOR MORE PARAMETER 
+if [ "$TARGET" == "ecgate" ] || [ "$TARGET" == "cca" ] || [ "$TARGET" == "ccb" ]; then
+  # check if necessary Parameters are set
+  if [ -z "$ECUID" ] || [ -z "$ECGID" ] || [ "$ECUID" == "<username>" ] || [ "$ECGID" == "<groupID>" ] ; then
+    echo "ERROR: At least one of the following parameters are not properly set: ECUID or ECGID!"
+    echo "EXIT WITH ERROR"
+    exit
+  else
+    parameterlist+=" --ecuid=$ECUID --ecgid=$ECGID --gateway=$GATEWAY --destination=$DESTINATION"
+  fi
+  if [ -z "$GATEWAY" ] || [ -z "$DESTINATION" ] || [ "$GATEWAY" == "<gatewayname>" ] || [ "$DESTINATION" == "<username>@genericSftp" ] ; then
+    echo "WARNING: Not setting parameters GATEWAY and DESTINATION means there will be no file transfer to local gateway server."
+  fi
+fi
+if [ -n "$MAKEFILE" ]; then
+  parameterlist+=" --makefile=$MAKEFILE"
+fi
+if [ -n "$FLEXPARTDIR" ]; then # not empty
+  parameterlist+=" --flexpartdir=$FLEXPARTDIR"
+fi
+if [ -n "$JOB_TEMPLATE" ]; then
+  parameterlist+=" --job_template=$JOB_TEMPLATE"
+fi
+if [ -n "$CONTROLFILE" ]; then
+  parameterlist+=" --controlfile=$CONTROLFILE"
+fi
+
+# -----------------------------------------------------------------
+# CALL INSTALLATION SCRIPT WITH DETERMINED COMMANDLINE ARGUMENTS
+
+$script $parameterlist
+
-- 
GitLab