Skip to content

Instantly share code, notes, and snippets.

@shigemk2
Created December 18, 2015 17:09
Show Gist options
  • Save shigemk2/21969d6a47aaec2e5073 to your computer and use it in GitHub Desktop.
Save shigemk2/21969d6a47aaec2e5073 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.2/ghq_linux_amd64.zip -O ghq_v0.7.2.zip
unzip -q -d ghq_v0.7.2 ghq_v0.7.2.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
mkdir -p /home/vagrant/atom
git init /home/vagrant/atom
ln -s /home/vagrant/atom /home/vagrant/GHQ_ROOT/github.com/atom/atom
mkdir -p /home/vagrant/GHQ_ROOT/github.com/atom/atom-2
git init /home/vagrant/GHQ_ROOT/github.com/atom/atom-2
mkdir -p /home/vagrant/GHQ_ROOT/github.com/zabbix
git init /home/vagrant/GHQ_ROOT/github.com/zabbix/zabbix
echo "----------------------------"
./ghq_linux_amd64/ghq -v
./ghq_linux_amd64/ghq list
echo "----------------------------"
./ghq_v0.7.2/ghq -v
./ghq_v0.7.2/ghq list
SHELL
end
@shigemk2
Copy link
Author

==> default: Initialized empty Git repository in /home/vagrant/GHQ_ROOT/github.com/atom/atom-2/.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-2 <--- I want to show github.com/atom/atom by executing "ghq list"
==> default: github.com/zabbix/zabbix
==> default: ----------------------------
==> default: ghq version 0.7.2
==> default: github.com/atom/atom-2 <--- I want to show github.com/atom/atom by executing "ghq list"
==> default: github.com/zabbix/zabbix

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