forked from spectresystems/spectre.cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·31 lines (27 loc) · 806 Bytes
/
build.sh
File metadata and controls
executable file
·31 lines (27 loc) · 806 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
#!/usr/bin/env bash
script_dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
# Get the platform that we're running on.
uname_out="$(uname -s)"
case "${uname_out}" in
Darwin*) platform=osx;;
*) platform=linux
esac
# Create the tools directory.
tools="$script_dir/tools"
if [ ! -d "$tools" ]; then
mkdir $tools
fi
# Make sure that cakeup exist.
cakeup="$tools/cakeup-x86_64-latest"
if [ ! -f "$cakeup" ]; then
echo "Downloading cakeup..."
curl -Lsfo $cakeup "https://cakeup.blob.core.windows.net/$platform/cakeup-x86_64-latest"
if [ $? -ne 0 ]; then
echo "An error occured while downloading cakeup."
exit 1
fi
chmod +x "$cakeup"
fi
# Start Cake
exec $cakeup run --cake="0.30.0" --sdk="2.1.400" \
--bootstrap --execute -- $@