source: flex_extract.git/setup.sh @ 982c91b

ctbtodev
Last change on this file since 982c91b was 433d1eb, checked in by Anne Philipp <anne.philipp@…>, 5 years ago

removed parameter from python program call / minor modifications in user settings (irrelevant)

  • Property mode set to 100755
File size: 2.1 KB
Line 
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.
11#    It also does some checks to guarantees necessary parameters
12#    were set.
13#
14# -----------------------------------------------------------------
15# AVAILABLE COMMANDLINE ARGUMENTS TO SET
16#
17# THE USER HAS TO SPECIFY THESE PARAMETERS
18#
19TARGET='ecgate'
20MAKEFILE='Makefile.gfortran'
21ECUID='km4a'
22ECGID='at'
23GATEWAY='srvx8.img.univie.ac.at'
24DESTINATION='annep@genericSftp'
25INSTALLDIR=None
26JOB_TEMPLATE=''
27CONTROLFILE='CONTROL_EA5'
28# -----------------------------------------------------------------
29#
30# AFTER THIS LINE THE USER DOES NOT HAVE TO CHANGE ANYTHING !!!
31#
32# -----------------------------------------------------------------
33
34# PATH TO INSTALLATION SCRIPT
35script="Source/Python/install.py"
36
37# INITIALIZE EMPTY PARAMETERLIST
38parameterlist=""
39
40# DEFAULT PARAMETERLIST
41if [ -n "$TARGET" ]; then
42  parameterlist=" --target=$TARGET"
43else
44  echo "ERROR: No installation target specified."
45  echo "EXIT WITH ERROR"
46  exit
47fi
48
49# CHECK FOR MORE PARAMETER
50if [ "$TARGET" == "ecgate" ] || [ "$TARGET" == "cca" ]; then
51  # check if necessary Parameters are set
52  if [ -z "$ECUID" ] || [ -z "$ECGID" ] || [ -z "$GATEWAY" ] || [ -z "$DESTINATION" ]; then
53    echo "ERROR: At least one of the following parameters are not set: ECUID, ECGID, GATEWAY, DESTINATION!"
54    echo "EXIT WITH ERROR"
55    exit
56  else
57    parameterlist+=" --ecuid=$ECUID --ecgid=$ECGID --gateway=$GATEWAY --destination=$DESTINATION"
58  fi
59fi
60if [ -n "$MAKEFILE" ]; then
61  parameterlist+=" --makefile=$MAKEFILE"
62fi
63if [ -n "$FLEXPARTDIR" ]; then # not empty
64  parameterlist+=" --flexpartdir=$FLEXPARTDIR"
65fi
66if [ -n "$JOB_TEMPLATE" ]; then
67  parameterlist+=" --job_template=$JOB_TEMPLATE"
68fi
69if [ -n "$CONTROLFILE" ]; then
70  parameterlist+=" --controlfile=$CONTROLFILE"
71fi
72
73# -----------------------------------------------------------------
74# CALL INSTALLATION SCRIPT WITH DETERMINED COMMANDLINE ARGUMENTS
75
76$script $parameterlist
77
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG