-
Notifications
You must be signed in to change notification settings - Fork 3
/
rbc.sh
executable file
·48 lines (37 loc) · 1.11 KB
/
rbc.sh
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
#!/bin/bash
# module load the latest version of python3 on your cluster for formatter
if [[ ":$PATH:" != *":$HOME/.local/bin:"* ]]; then
export PATH="$PATH:$HOME/.local/bin"
fi
# check python3 works
command -v python3 > /dev/null 2>&1
if (($?)); then
echo "[rbc.sh] Error: Couldn't find Python3. Please ensure it is discoverable."
exit 1
fi
python3 -c 'print("")' > /dev/null
if (($?)); then
echo "[rbc.sh] Error: Python3 is present but can't execute a simple program. Please ensure that python3 is working."
exit 1
fi
if [ "$1" == 'format' ]; then
. "$(pwd)/install/format.sh" $@; exit
fi
if [ "$1" == 'install' ]; then
. "$(pwd)/install/install.sh" $@; exit
fi
if [ "$1" == 'install-phoenix' ]; then
. "$(pwd)/install/install-phoenix.sh" $@; exit
fi
if [ "$1" == 'install-makedepf90' ]; then
. "$(pwd)/install/install-makedepf90.sh" $@; exit
fi
if [ "$1" == 'install-ice' ]; then
. "$(pwd)/install/install-ice.sh" $@; exit
fi
if [ "$1" == 'install-mac' ]; then
. "$(pwd)/install/install-mac.sh" $@; exit
fi
if [ "$1" == 'cmake' ]; then
. "$(pwd)/install/cmake.sh" $@; exit
fi