-
Notifications
You must be signed in to change notification settings - Fork 4
/
configure
executable file
·103 lines (92 loc) · 1.86 KB
/
configure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#! /bin/sh
#
# configuration script for 3DEX
# to configure the F90 code.
#
# Version : v1.0
# Date : July 2011
#
# version number
F3DEXVERSION=1.0
#-------------
welcome () {
echo
echo "*****************************"
echo " 3DEX - Configuration script"
echo "*****************************"
echo
}
# read functions definition
. ./3dexconfig_functions.sh
# foreplay1
setTopDefaults
DMPX_CONF_DIR=${DMPX_CONF_DIR_HOME}
# ----------------- options parsing ----------------------
usage="Usage: ./$(basename $0) [?|-h|-L|-v]"
usage2="Type ./$(basename $0) -h for extended help"
# do not accept options starting with a non-dash or with double dash
if [ ${#} -gt 0 ]; then
if [ "${1:0:1}" != "-" -o "${1:0:2}" = "--" -o "${1}" = "-" ]; then
echo
echo "${usage}"
echo
echo "${usage2}"
echo
exit -1
fi
fi
while getopts 'hLv' OPTION
do
case ${OPTION} in
h)
echo
echo "Configure script for 3DEX ${F3DEXVERSION}"
echo
echo "${usage}"
echo
echo "? Print usage and exit"
echo
echo "-h Print this help message and exit"
echo
echo "-L Put the configuration directory in ${DMPX_CONF_DIR_INPLACE}"
echo " (instead of installer's home: ${DMPX_CONF_DIR_HOME})."
echo " Recommended when doing a system wide installation to be used by several users."
echo
echo "-v Print 3DEX version and exit"
echo
exit 0
;;
L)
DMPX_CONF_DIR=${DMPX_CONF_DIR_INPLACE}
echo
echo "Note: the configuration directory will be ${DMPX_CONF_DIR}"
echo
;;
v)
echo "${F3DEXVERSION}"
exit 0
;;
?)
echo
echo "${usage}"
echo
echo "${usage2}"
echo
exit -1
;;
esac
done
# --------------------------------------------------------
#-------------
# foreplay2
setConfDir
welcome
makeTopConf
readyTopMakefile
#installProfile
# loop over main menu
eval f90conffile=$DMPX_CONF_F90
f90_config $f90conffile;
# done
goodBye
exit