-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
67 lines (49 loc) · 1.69 KB
/
Vagrantfile
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = 'ubuntu/xenial64'
config.vm.provider 'virtualbox' do |vb|
vb.memory = '2048'
end
config.vm.synced_folder './share', '/home/vagrant/share', create: true
config.vm.provision 'shell', privileged: false, inline: <<-SHELL
# change to use JAIST mirror server
if grep '//ftp.jaist.ac.jp/pub/Linux' /etc/apt/sources.list
then
echo 'already used JAIST mirror server'
else
sudo sed -i.bak -e 's|//archive.ubuntu.com|//ftp.jaist.ac.jp/pub/Linux|' /etc/apt/sources.list
fi
# update
sudo apt-get update
sudo apt-get --yes upgrade
# install dependencies
sudo apt-get install --yes build-essential g++
# install Git
sudo apt-get install --yes git
# install Vim
sudo apt-get install --yes vim
# set default editor
echo 'export EDITOR=vim' >> $HOME/.bashrc
# create symlink for share
ln -s /vagrant $HOME/share
# fast `git status`
sudo git config --system core.preloadindex true
sudo git config --system core.fscache true
# show multibyte filename
# "\346\227\245\346\234\254\350\252\236OK.xlsx" -> 日本語OK.xls
sudo git config --system core.quotepath false
# install nodebrew
curl -fsSL git.io/nodebrew | perl - setup
# add PATH
export PATH=$HOME/.nodebrew/current/bin:$PATH
# add PATH to .bashrc
echo 'export PATH=$HOME/.nodebrew/current/bin:$PATH' >> $HOME/.bashrc
# install node.js, progress send to /dev/null
nodebrew install-binary stable 2>/dev/null
# set node.js
nodebrew use stable
# install task runner modules
npm install -g grunt-cli gulp-cli
SHELL
end