Skip to content

Instantly share code, notes, and snippets.

@fletcher
Created October 20, 2023 19:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fletcher/bf895868b46e870138ced1b985d18d70 to your computer and use it in GitHub Desktop.
Save fletcher/bf895868b46e870138ced1b985d18d70 to your computer and use it in GitHub Desktop.
Bootstrap provisioning file for lightweight Ubuntu virtual machine in Vagrant
#!/usr/bin/env bash
apt-get update
# Install development packages for MMD
apt-get install -y build-essential cmake mingw-w64 nsis libbsd-dev
# Ruby stuff for squib
apt-get install -y ruby ruby-dev
gem install squib
# GTK-Editor
# Create a git server
# Create account
if [ ! -d /home/git ]; then
useradd git --create-home --shell /bin/bash
mkdir /home/git/.ssh
# Use authorized keys file for public key authentication
# You will need to have generated this file and put it in
# the directory prior to provisioning
cp /vagrant/authorized_keys /home/git/.ssh/authorized_keys
# Fix permissions
chown -R git:git /home/git/.ssh
chmod go-w /home/git
chmod 700 /home/git/.ssh
chmod 600 /home/git/.ssh/authorized_keys
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment