Skip to content

Commit c78570a

Browse files
committed
added Vagrantfile
1 parent cd5845c commit c78570a

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

Vagrantfile

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
Vagrant.configure(2) do |config|
5+
config.vm.box = 'ubuntu/xenial64'
6+
7+
config.vm.provider 'virtualbox' do |vb|
8+
vb.memory = '2048'
9+
end
10+
11+
config.vm.synced_folder './share', '/home/vagrant/share', create: true
12+
13+
config.vm.provision 'shell', privileged: false, inline: <<-SHELL
14+
# change to use JAIST mirror server
15+
if grep '//ftp.jaist.ac.jp/pub/Linux' /etc/apt/sources.list
16+
then
17+
echo 'already used JAIST mirror server'
18+
else
19+
sudo sed -i.bak -e 's|//archive.ubuntu.com|//ftp.jaist.ac.jp/pub/Linux|' /etc/apt/sources.list
20+
fi
21+
22+
# update
23+
sudo apt-get update
24+
sudo apt-get --yes upgrade
25+
26+
# install dependencies
27+
sudo apt-get install --yes build-essential g++
28+
29+
# install Git
30+
sudo apt-get install --yes git
31+
32+
# create symlink for share
33+
ln -s /vagrant $HOME/share
34+
35+
# fast `git status`
36+
sudo git config --system core.preloadindex true
37+
sudo git config --system core.fscache true
38+
39+
# show multibyte filename
40+
# "\346\227\245\346\234\254\350\252\236OK.xlsx" -> 日本語OK.xls
41+
sudo git config --system core.quotepath false
42+
43+
# install nodebrew
44+
curl -fsSL git.io/nodebrew | perl - setup
45+
46+
# add PATH
47+
export PATH=$HOME/.nodebrew/current/bin:$PATH
48+
49+
# add PATH to .bashrc
50+
echo 'export PATH=$HOME/.nodebrew/current/bin:$PATH' >> $HOME/.bashrc
51+
52+
# install node.js, progress send to /dev/null
53+
nodebrew install-binary stable 2>/dev/null
54+
55+
# set node.js
56+
nodebrew use stable
57+
SHELL
58+
end

0 commit comments

Comments
 (0)