-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsetup.sh
44 lines (38 loc) · 1.02 KB
/
setup.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
#!/bin/bash
OS="$(uname)"
if [[ "$OS" == "Linux" ]]; then
echo "Detected Linux OS"
WATCHMAN_CHECK="$(which watchman)"
if [[ "$WATCHMAN_CHECK" == "" ]]; then
echo "Watchman not installed. Installing now..."
sudo apt-get update
sudo apt-get install -y watchman
else
echo "Watchman is already installed"
fi
elif [[ "$OS" == "Darwin" ]]; then
echo "Detected macOS"
WATCHMAN_CHECK="$(which watchman)"
if [[ "$WATCHMAN_CHECK" == "" ]]; then
echo "Watchman not installed. Installing now..."
brew install watchman
else
echo "Watchman is already installed"
fi
else
echo "Unsupported operating system: $OS"
exit 1
fi
PIP_CHECK="$(which pip)"
if [[ "$PIP_CHECK" == "" ]]; then
echo "pip not installed. Please install pip first."
exit 1
else
echo "pip is already installed"
fi
echo "Installing pyre-check..."
pip install pyre-check
echo "Running 'pyre init' in the current directory..."
pyre init
echo "Starting pyre server..."
pyre start