Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
vagrant initial script
#!/usr/bin/env bash
# vagrant provisioning shell script for my development environemt
# for ubuntu/trusty64
test -f /etc/bootstrapped && exit
# install development utility
sudo apt-get -y install gcc
sudo apt-get -y install make
sudo apt-get -y install git
sudo apt-get -y install tmux
sudo apt-get -y install graphviz
sudo apt-get -y install ncurses-dev
sudo apt-get -y install tree
# download and install go
curl https://storage.googleapis.com/golang/go1.9.2.linux-amd64.tar.gz > go1.9.2.tar.gz 2>/dev/null
sudo tar -C /usr/local -xzf go1.9.2.tar.gz 2>/dev/null
echo 'export PATH=$PATH:/usr/local/go/bin' >> /home/vagrant/.profile
# download and install vim
cd /usr/local/src/
sudo git clone https://github.com/vim/vim.git
cd vim/src
sudo ./configure \
--enable-fail-if-missing \
--with-features=huge \
--disable-selinux \
--enable-cscope \
--enable-fontset \
--enable-multibyte
sudo make
sudo make install
echo 'alias vi=/usr/local/bin/vim' >> /home/vagrant/.profile
cd
# setup gopath
mkdir -p /home/vagrant/go
echo 'export GOPATH=/home/vagrant/go' >> /home/vagrant/.profile
echo 'export PATH=$PATH:$GOPATH' >> /home/vagrant/.profile
# setup development utility
curl https://gist.githubusercontent.com/twinbird/adcec8abec12ad3398d0/raw/2b5a95e601d5110b81017d869154e3283f8f48f6/.vimrc > .vimrc 2>/dev/null
curl https://gist.githubusercontent.com/twinbird/040b298673e5c813a29962d3e5b858c6/raw/0fdabd414b929542e25c745984e3384ad32b79fd/.tmux.conf > .tmux.conf 2>/dev/null
git clone https://github.com/VundleVim/Vundle.vim.git /home/vagrant/.vim/bundle/Vundle.vim 2>/dev/null
# git configuration
git config --global user.name "twinbird"
git config --global user.email "ixa2063@gmail.com"
git config --global core.editor 'vim'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.