-
-
Notifications
You must be signed in to change notification settings - Fork 37
/
INSTALL_mac.sh
49 lines (42 loc) · 1.11 KB
/
INSTALL_mac.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
#/bin/bash
echo ''
echo '[*] Welcome to the installer for edit.tosdr.org!'
echo ''
echo ' ###############'
echo ' ###############'
echo ' ########### I have read and agreed to the terms'
echo ' ########### is the biggest lie on the web.'
echo ' #######'
echo ' ####### We aim to fix that.'
sleep 1;
echo ''
echo '[*] Installing Rbenv'
if [ -d ~/.rbenv ]; then
echo 'Rbenv exists installing Ruby 2.7.2, it might take a while...'
rbenv install 2.7.2
else
brew install rbenv
echo 'Rbenv exists now installing Ruby 2.7.2, it might take a while...'
rbenv install 2.7.2
fi
if hash yarn 2>/dev/null; then
echo 'You have yarn!'
else
brew install yarn
fi
if hash psql 2>/dev/null; then
echo 'You have postgres!'
else
echo '[*] Installing postgres'
brew install postgres
brew services start postgresql
fi
echo '[*] Setting local ruby version to 2.7.2'
rbenv local 2.7.2
echo '[*] Installing gems'
bundle install
echo '[*] Compiling JS'
yarn install
echo '[*] Setting up the database'
rails db:create db:migrate
echo '[*] You are ready to go! Run "rails server" to start the server'