Changeset 78d1f9d in flex_extract.git for setup.sh


Ignore:
Timestamp:
Oct 20, 2022, 8:43:44 PM (19 months ago)
Author:
Anne Tipka <anne.tipka@…>
Branches:
dev
Children:
94d3227
Parents:
c31ee05
Message:

backup for Reading setup files; linking old setup file names to Bologna versions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • setup.sh

    • Property mode changed from 100755 to 120000
    r3a54479 r78d1f9d  
    1 #!/bin/bash
    2 #
    3 # @Author: Anne Philipp
    4 #
    5 # @Date: September, 10 2018
    6 #
    7 # @Description:
    8 #    This file defines the flex_extract's available installation
    9 #    parameters and puts them together for the call of the actual
    10 #    python installation script. It also does some checks to
    11 #    guarantee necessary parameters were set.
    12 #
    13 # @Licence:
    14 #    (C) Copyright 2014-2020.
    15 #
    16 #    SPDX-License-Identifier: CC-BY-4.0
    17 #
    18 #    This work is licensed under the Creative Commons Attribution 4.0
    19 #    International License. To view a copy of this license, visit
    20 #    http://creativecommons.org/licenses/by/4.0/ or send a letter to
    21 #    Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
    22 #
    23 # -----------------------------------------------------------------
    24 # AVAILABLE COMMANDLINE ARGUMENTS TO SET
    25 #
    26 # THE USER HAS TO SPECIFY THESE PARAMETERS
    27 #
    28 TARGET='ecgate'
    29 MAKEFILE='makefile_ecgate'
    30 ECUID='<username>'
    31 ECGID='<groupID>'
    32 GATEWAY='<gatewayname>'
    33 DESTINATION='<username>@genericSftp'
    34 INSTALLDIR=None
    35 JOB_TEMPLATE=''
    36 CONTROLFILE='CONTROL_EA5'
    37 # -----------------------------------------------------------------
    38 #
    39 # AFTER THIS LINE THE USER DOES NOT HAVE TO CHANGE ANYTHING !!!
    40 #
    41 # -----------------------------------------------------------------
    42 
    43 # PATH TO INSTALLATION SCRIPT
    44 script="Source/Python/install.py"
    45 
    46 # INITIALIZE EMPTY PARAMETERLIST
    47 parameterlist=""
    48 
    49 # CHECK IF ON ECMWF SERVER;
    50 if [[ $HOST == *"ecgb"* ]] || [[ $HOST == *"cca"* ]] || [[ $HOST == *"ccb"* ]]; then
    51 # LOAD PYTHON3 MODULE
    52   module load python3
    53 fi
    54 
    55 # DEFAULT PARAMETERLIST
    56 if [ -n "$TARGET" ]; then
    57   parameterlist=" --target=$TARGET"
    58 else
    59   echo "ERROR: No installation target specified."
    60   echo "EXIT WITH ERROR"
    61   exit
    62 fi
    63 
    64 # CHECK FOR MORE PARAMETER
    65 if [ "$TARGET" == "ecgate" ] || [ "$TARGET" == "cca" ] || [ "$TARGET" == "ccb" ]; then
    66   # check if necessary Parameters are set
    67   if [ -z "$ECUID" ] || [ -z "$ECGID" ] || [ "$ECUID" == "<username>" ] || [ "$ECGID" == "<groupID>" ] ; then
    68     echo "ERROR: At least one of the following parameters are not properly set: ECUID or ECGID!"
    69     echo "EXIT WITH ERROR"
    70     exit
    71   else
    72     parameterlist+=" --ecuid=$ECUID --ecgid=$ECGID --gateway=$GATEWAY --destination=$DESTINATION"
    73   fi
    74   if [ -z "$GATEWAY" ] || [ -z "$DESTINATION" ] || [ "$GATEWAY" == "<gatewayname>" ] || [ "$DESTINATION" == "<username>@genericSftp" ] ; then
    75     echo "WARNING: Not setting parameters GATEWAY and DESTINATION means there will be no file transfer to local gateway server."
    76   fi
    77 fi
    78 if [ -n "$MAKEFILE" ]; then
    79   parameterlist+=" --makefile=$MAKEFILE"
    80 fi
    81 if [ -n "$FLEXPARTDIR" ]; then # not empty
    82   parameterlist+=" --flexpartdir=$FLEXPARTDIR"
    83 fi
    84 if [ -n "$JOB_TEMPLATE" ]; then
    85   parameterlist+=" --job_template=$JOB_TEMPLATE"
    86 fi
    87 if [ -n "$CONTROLFILE" ]; then
    88   parameterlist+=" --controlfile=$CONTROLFILE"
    89 fi
    90 
    91 # -----------------------------------------------------------------
    92 # CALL INSTALLATION SCRIPT WITH DETERMINED COMMANDLINE ARGUMENTS
    93 
    94 $script $parameterlist
    95 
     1setup_bologna.sh
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG