-
Notifications
You must be signed in to change notification settings - Fork 345
/
setup.sh
executable file
·82 lines (71 loc) · 1.07 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/bin/bash
#!/bin/bash
#
# Detects if system is macOS
#
is_mac() {
if [[ `uname` == "Darwin" ]]; then
return 0
else
return 1
fi
}
#
# Detects if system is Linux
#
is_linux() {
if [[ `uname` == "Linux" ]]; then
return 0
else
return 1
fi
}
#
# Detects if environment is ZSH
#
is_zsh() {
if [ -n "$ZSH_VERSION" ]; then
return 0
elif [ -n "$BASH_VERSION" ]; then
return 1
fi
}
#
# Resets the color
#
msg_reset () {
RESET='\033[0m'
printf "${RESET}\n"
}
#
# Log an error
#
error () {
RED_FORE='\033[0;31m'
printf "${RED_FORE}ERROR: $1"
msg_reset
}
#
# Log verbose message
#
verbose () {
CYAN_FORE='\033[0;36m'
printf "${CYAN_FORE}INFO: $1"
msg_reset
}
#
# Log message
#
msg () {
printf "$1\n"
}
install_web() {
msg "Install Web Interface..."
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
gem install sass
rbenv rehash
npm install
}
install_web
msg "You should now be able to launch the doubtfire web interface using 'npm start'"