forked from silq-lang/silq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dependencies.sh
executable file
·39 lines (33 loc) · 1.11 KB
/
dependencies.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
#!/bin/bash
if [ ! -d dmd2 ]; then
VERSION="2.092.1"
if [[ "$OSTYPE" == "linux-gnu" ]]; then
FILE="dmd.$VERSION.linux.zip"
SUM1="ea060277b3e8f201b8cf1684ba88b7ba $FILE"
MD5="md5sum"
elif [[ "$OSTYPE" == "darwin"* ]]; then
# Note that on macOS gnuplot should be installed with x11 set as terminal.
# Using homebrew: brew install gnuplot --with-x11
FILE="dmd.$VERSION.osx.zip"
SUM1="MD5 ($FILE) = 7593b33f985d1d08b2808354f220fc05"
MD5="md5"
else
>&2 echo "This script does not support your platform at this time."
>&2 echo "Try to obtain the dmd d compiler manually from:"
>&2 echo "https://dlang.org"
>&2 echo "Pull requests for improved build script welcome."
exit 1;
fi
ZIPLINK="http://downloads.dlang.org/releases/2.x/$VERSION/$FILE"
wget -nc $ZIPLINK
SUM2=`$MD5 $FILE`
if [[ $SUM1 != $SUM2 ]]; then
echo "ERROR: md5 sum mismatch"
echo "EXPECTED: $SUM1"
echo "GOT : $SUM2"
else
unzip $FILE
fi
fi
git submodule init
git submodule update