Refactor / idempotent-fy vagrant.sh

Big changes:
1) Update packages!
2) Remove uncessary X11 packages (wisely, before updating all the packages)
3) Install all packages at once
4) Leave package addition in same order, because, it looked interesting?
5) Look for symlink before making it (Vagrant errors out on second
   provision otherwise)
6) Build demboyz
This commit is contained in:
John H. Robinson, IV 2015-10-11 09:55:14 -07:00
parent 54a75479e6
commit d7c27bbcf1

View File

@ -4,10 +4,24 @@
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update
sudo apt-get install build-essential -y
# Remove X11 cruft
sudo apt-get autoremove -y
sudo apt-get install gcc-4.9 g++-4.9 -y
sudo apt-get install gcc-4.9-multilib g++-4.9-multilib -y
# Keep things up to date
sudo apt-get upgrade -y
sudo apt-get install clang-3.6++ -y
sudo ln -s /usr/bin/clang++-3.6 /usr/bin/clang++
packages=""; # Start with nothing; can re-order rest to heart's content
packages="$packages build-essential"
packages="$packages gcc-4.9 g++-4.9"
packages="$packages gcc-4.9-multilib g++-4.9-multilib"
packages="$packages clang-3.6++"
sudo apt-get install -y $packages
# Why doesn't clang do this for us?
[ ! -e /usr/bin/clang++ ] && sudo ln -s /usr/bin/clang++-3.6 /usr/bin/clang++
# Build it!
cd /vagrant/premake
/bin/bash gmake.sh && { cd gmake; make; }