-
-
Notifications
You must be signed in to change notification settings - Fork 614
/
Copy pathwindows-visual-studio.sh
58 lines (45 loc) · 1.57 KB
/
windows-visual-studio.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
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/env bash
set -euxo pipefail
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
. "$DIR"/lib.sh
CURL_USER_AGENT="DMD-CI $(curl --version | head -n 1)"
DMD_DIR="$PWD"
################################################################################
# Download LDC
################################################################################
ldc() {
LDC_DIR="ldc2-${LDC_VERSION}-windows-multilib"
LDC_INSTALLER="${LDC_DIR}.7z"
LDC_URL="https://github.com/ldc-developers/ldc/releases/download/v${LDC_VERSION}/${LDC_INSTALLER}"
if [ ! -e "$LDC_INSTALLER" ] ; then
download "$LDC_URL" "$LDC_INSTALLER"
fi
7z x "$LDC_INSTALLER" > /dev/null
if [ ! -e "$LDC_DIR/bin/ldmd2.exe" ] ; then
echo "Unexpected LDC installation, $LDC_INSTALLER/bin/ldmd2.exe missing"
exit 1
fi
}
################################################################################
# Download VisualD
################################################################################
visuald() {
local VISUALD_INSTALLER="VisualD-${VISUALD_VER}.exe"
local VISUALD_URL="https://github.com/dlang/visuald/releases/download/${VISUALD_VER}/${VISUALD_INSTALLER}"
if [ ! -e "$VISUALD_INSTALLER" ] ; then
download "$VISUALD_URL" "$VISUALD_INSTALLER"
fi
}
if [ "$D_COMPILER" == "ldc" ]; then
echo "[STEP]: Downloading LDC"
ldc
else
echo "[STEP]: Downloading DMD"
install_host_dmd
fi
echo "[STEP]: Downloading VisualD"
visuald
echo "[STEP]: Downloading grep"
install_grep
echo "[STEP]: Cloning repositories"
clone_repos