-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall_deps
executable file
·62 lines (53 loc) · 1.29 KB
/
install_deps
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
#!/usr/bin/env bash
# Mac
function install_deps_osx
{
# Homebrew
if ! command -v brew > /dev/null; then
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"
fi
brew doctor
brew install cscope wget lrzsz
# Update to BASH 4+
if ((BASH_VERSINFO[0] < 4)); then
brew install bash
grep -q -F '/usr/local/bin/bash' /etc/shells || echo '/usr/local/bin/bash' | sudo tee -a /etc/shells > /dev/null
chsh -s /usr/local/bin/bash
fi
}
# Fedora
function install_deps_linux_fedora
{
sudo yum -y install ctags cscope vim htop
}
# Ubuntu
function install_deps_linux_ubuntu
{
# Latest stable Git release
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git
sudo apt-get install ctags cscope vim htop
}
# Linux
function install_deps_linux
{
if command -v yum > /dev/null; then
install_deps_linux_fedora
elif command -v apt-get > /dev/null; then
install_deps_linux_ubuntu
fi
}
PLATFORM="$(tr [A-Z] [a-z] <<< $(uname))"
case $PLATFORM in
"darwin")
install_deps_osx
;;
"linux")
install_deps_linux
;;
*)
echo "No dependencies setup for $PLATFORM"
;;
esac