Changeset 78d1f9d in flex_extract.git for setup_local.sh
- Timestamp:
- Oct 20, 2022, 8:43:44 PM (19 months ago)
- Branches:
- dev
- Children:
- 94d3227
- Parents:
- c31ee05
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
setup_local.sh
- Property mode changed from 100755 to 120000
r75db9b0 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 # @History: 14 # Leopold Haimberger; Aug 2020 15 # added new parameter for a system installation 16 # (seperate executable and user directories) 17 # 18 # @Licence: 19 # (C) Copyright 2014-2020. 20 # 21 # SPDX-License-Identifier: CC-BY-4.0 22 # 23 # This work is licensed under the Creative Commons Attribution 4.0 24 # International License. To view a copy of this license, visit 25 # http://creativecommons.org/licenses/by/4.0/ or send a letter to 26 # Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. 27 # 28 # ----------------------------------------------------------------- 29 # AVAILABLE COMMANDLINE ARGUMENTS TO SET 30 # 31 # THE USER HAS TO SPECIFY THESE PARAMETERS 32 # 33 TARGET='local' 34 MAKEFILE='makefile_local_gfortran' 35 ECUID='<username>' 36 ECGID='<groupID>' 37 GATEWAY='<gatewayname>' 38 DESTINATION='<name>@genericSftp' 39 INSTALLDIR=None 40 SYSINSTALLDIR=None 41 JOB_TEMPLATE='' 42 CONTROLFILE='CONTROL_CERA' 43 # ----------------------------------------------------------------- 44 # 45 # AFTER THIS LINE THE USER DOES NOT HAVE TO CHANGE ANYTHING !!! 46 # 47 # ----------------------------------------------------------------- 48 49 # PATH TO INSTALLATION SCRIPT 50 script="Source/Python/install.py" 51 52 # INITIALIZE EMPTY PARAMETERLIST 53 parameterlist="" 54 55 # CHECK IF ON ECMWF SERVER; 56 if [[ $HOST == *"ecgb"* ]] || [[ $HOST == *"cca"* ]] || [[ $HOST == *"ccb"* ]]; then 57 # LOAD PYTHON3 MODULE 58 module load python3 59 fi 60 61 # DEFAULT PARAMETERLIST 62 if [ -n "$TARGET" ]; then 63 parameterlist=" --target=$TARGET" 64 else 65 echo "ERROR: No installation target specified." 66 echo "EXIT WITH ERROR" 67 exit 68 fi 69 70 # CHECK FOR MORE PARAMETER 71 if [ "$TARGET" == "ecgate" ] || [ "$TARGET" == "cca" ]; then 72 # check if necessary Parameters are set 73 if [ -z "$ECUID" ] || [ -z "$ECGID" ] || [ -z "$GATEWAY" ] || [ -z "$DESTINATION" ]; then 74 echo "ERROR: At least one of the following parameters are not set: ECUID, ECGID, GATEWAY, DESTINATION!" 75 echo "EXIT WITH ERROR" 76 exit 77 else 78 parameterlist+=" --ecuid=$ECUID --ecgid=$ECGID --gateway=$GATEWAY --destination=$DESTINATION" 79 fi 80 fi 81 if [ -n "$MAKEFILE" ]; then 82 parameterlist+=" --makefile=$MAKEFILE" 83 fi 84 if [ -n "$INSTALLDIR" ]; then 85 parameterlist+=" --installdir=$INSTALLDIR" 86 fi 87 if [ -n "$SYSINSTALLDIR" ]; then 88 parameterlist+=" --sysinstalldir=$SYSINSTALLDIR" 89 fi 90 if [ -n "$JOB_TEMPLATE" ]; then 91 parameterlist+=" --job_template=$JOB_TEMPLATE" 92 fi 93 if [ -n "$CONTROLFILE" ]; then 94 parameterlist+=" --controlfile=$CONTROLFILE" 95 fi 96 97 # ----------------------------------------------------------------- 98 # CALL INSTALLATION SCRIPT WITH DETERMINED COMMANDLINE ARGUMENTS 99 100 $script $parameterlist 101 102 103 1 setup_local_bologna.sh
Note: See TracChangeset
for help on using the changeset viewer.