-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.sh
41 lines (31 loc) · 1.22 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
#!/bin/bash
exists() { [ ! -z `which "$1"` ]; }
# or: exists() { type -t "$1" > /dev/null 2>&1; }
# install homebrew if it is not exixts
# http://brew.sh/
if ! exists brew; then
echo 'Homebrew not found! install it!'
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# install useful tool
brew install git ack tmux jq mtr bash-completion
# brew install gcc cmake
# brew install jpegoptim optipng
# brew install ffmpeg
# brew install nmap speedtest_cli
# brew install dnsmasq mysql nvm
# clone rc-files
cd
git clone https://github.com/joeangel/rc-files.git
# backup origin rc-files
mkdir -p ~/rc_backup
cd ~/rc-files
find . -maxdepth 1 ! -path . ! -path ./.git ! -path ./setup.sh ! -path ./README.md -exec mv .{} ../rc_backup/. \;
# move ~/rc-files/* to ~/
cd
find rc-files -maxdepth 1 ! -path rc-files ! -path rc-files/.git ! -path rc-files/.gitignore ! -path rc-files/setup.sh ! -path rc-files/README.md ! -path rc-files/setup_ubuntu.sh ! -path rc-files/install_nvm_ubuntu.sh -exec ln -s {} . \;
# install Vim Bundle
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
source ~/.bashrc
echo "1) Update ~/.bashrc for PS1 string"
echo "2) Then, source ~/.bashrc"