-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdeps.sh
More file actions
executable file
·51 lines (40 loc) · 1012 Bytes
/
deps.sh
File metadata and controls
executable file
·51 lines (40 loc) · 1012 Bytes
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
#!/bin/bash -e
force=0
if [ "x${1}" = "x--force" ]; then
force=1
fi
if [ ! -e deps.sh ]; then
echo "run deps.sh from the root directory, i.e."
echo "\$ ./deps.sh"
exit 1
fi
# check for needed tools
for i in wget tar unzip python3; do
if [ -z "$(which $i)" ]; then
echo "error: ${i} not installed"
exit 1
fi
done
# this one needs to be either world writable or owned by the user running the web server
# we start with 0777 but a sane admin would change it back to 0744 (or less)
if [ ! -d data ]; then
mkdir -p data
chmod 0777 data
fi
# mark that deps.sh has been run (not that it succeeded yet)
touch data/deps-run
# create gitignored directories
mkdir -p deps bin
# Function to compare versions
version_ge() {
printf '%s\n%s\n' "$2" "$1" | sort -V -C
return $?
}
# TODO: parse conf.php
. renderers/x3dom/deps.sh
. uxs/faster-than-quick/deps.sh
. meshers/gmsh/deps.sh
. solvers/feenox/deps.sh
. solvers/ccx/deps.sh
# mark that deps.sh has been succeeded
touch data/deps-ok