forked from zinc-collective/convene
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup
executable file
·49 lines (40 loc) · 1.22 KB
/
setup
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
#!/bin/bash
function install_package {
echo "Attempting to install $1"
output=$(command -v brew)
if [ -n "$output" ]; then
echo "Installing $1 via homebrew"
brew install $1
return
fi
echo "We're not sure how to automatically install $1 on your machine"
echo "If you want help, reach out via chat or github!"
}
function setup_package {
command_output=$(command -v $1)
brew_output=$(brew ls --versions $1)
if [ -z "$command_output" ]; then
echo "$1 command not detected, checking brew"
if [ -z "$brew_output" ]; then
echo "$1 not found, installing through Homebrew"
install_package $1
else
echo "$1 installed, continuing..."
fi
else
echo "$1 installed, continuing..."
fi
}
## SYSTEM LEVEL DEPENDENCIES ##
setup_package "overmind"
setup_package "yarn"
setup_package "redis"
setup_package "graphviz"
setup_package "vips" # for image processing by Active Storage
# Firefox web browser is used for interface testing.
brew install --cask firefox
yarn global add maildev
bin/copy-example-envs
# TODO: Figure out how to lock node version, asset building depends on min nodejs version of 12.20.0
# see https://github.com/postcss/postcss-cli/issues/404 for details
bin/setup-rails