-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
49 lines (40 loc) · 1001 Bytes
/
install.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
#!/usr/bin/env bash
set -euo pipefail
TARGET="/usr/local/bin/mango"
if [[ -e "$TARGET" ]]; then
echo "WARNING: $TARGET already exists"
echo "Installer will continue in 5 seconds..."
sleep 5
fi
if which -s docker; then
echo "docker found"
else
echo "docker not found"
echo "see https://docs.docker.com/docker-for-mac/"
exit 1
fi
if which -s brew; then
echo "brew found"
else
echo "brew not found, installing"
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
if which -s jq; then
echo "jq found"
else
echo "jq not found, installing"
brew install jq
fi
if which -s curl; then
echo "curl found"
else
echo "curl not found, installing"
brew install curl
fi
curl -sS -L "https://s3-eu-west-1.amazonaws.com/build.mangoweb.org/mango-ca8d860d50994f17186e/mango.sh" \
> "$TARGET"
chmod a+x "$TARGET"
echo "Installed into $TARGET, which should be available as 'mango'"
echo "---------"
echo "Try running this command:"
echo " mango"