Skip to content

Instantly share code, notes, and snippets.

@kyanny
Created August 5, 2015 16:55
Show Gist options
  • Save kyanny/c231f48e5d08b98ff2c3 to your computer and use it in GitHub Desktop.
Save kyanny/c231f48e5d08b98ff2c3 to your computer and use it in GitHub Desktop.
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provision "shell", inline: <<-SHELL
sudo apt-get update
sudo apt-get install -y git
sudo apt-get install -y unzip
wget --quiet https://github.com/motemen/ghq/releases/download/v0.7/ghq_linux_amd64.zip -O ghq_v0.7.zip
unzip -q -d ghq_v0.7 ghq_v0.7.zip
wget --quiet https://github.com/motemen/ghq/releases/download/v0.6/ghq_linux_amd64.tar.gz -O ghq_v0.6.tar.gz
tar xzf ghq_v0.6.tar.gz
mkdir -p /home/vagrant/GHQ_ROOT
git config --global ghq.root /home/vagrant/GHQ_ROOT
mkdir -p /home/vagrant/GHQ_ROOT/github.com/atom
git init /home/vagrant/GHQ_ROOT/github.com/atom/atom
mkdir -p /home/vagrant/GHQ_ROOT/github.com/zabbix
git init /home/vagrant/GHQ_ROOT/github.com/zabbix/zabbix
ln -s /home/vagrant/GHQ_ROOT/github.com /home/vagrant/GHQ_SYM
ln -s /home/vagrant/GHQ_SYM /home/vagrant/GHQ_ROOT/github.com/ghq
echo "----------------------------"
./ghq_linux_amd64/ghq -v
./ghq_linux_amd64/ghq list
echo "----------------------------"
./ghq_v0.7/ghq -v
./ghq_v0.7/ghq list
SHELL
end
@kyanny
Copy link
Author

kyanny commented Aug 5, 2015

$ vagrant up
(snip)
==> default: Initialized empty Git repository in /home/vagrant/GHQ_ROOT/github.com/atom/atom/.git/
==> default: Initialized empty Git repository in /home/vagrant/GHQ_ROOT/github.com/zabbix/zabbix/.git/
==> default: ----------------------------
==> default: ghq version v0.6 (master)
==> default: github.com/atom/atom
==> default: github.com/zabbix/zabbix
==> default: ----------------------------
==> default: ghq version 0.7.0
==> default: github.com/atom/atom   <--- github.com/zabbix/zabbix も list されるべきだがでてこない

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment