source: flex_extract.git/setup.sh @ ad10eca

dev
Last change on this file since ad10eca was 34b247b, checked in by Anne Philipp <anne.philipp@…>, 10 months ago

new installation

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