Skip to content

Instantly share code, notes, and snippets.

@kamilion
Created December 25, 2018 13:32
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 kamilion/3a2c87b1a72b01659b580a20df13e617 to your computer and use it in GitHub Desktop.
Save kamilion/3a2c87b1a72b01659b580a20df13e617 to your computer and use it in GitHub Desktop.
#!/bin/bash
echo "HOOK: Updating package lists..."
apt update
apt list --upgradable
echo "HOOK: Enabling squid-deb-proxy-client for local network..."
apt install squid-deb-proxy-client -y
echo "HOOK: Installing git."
apt-get install -y --no-install-recommends git
echo "HOOK: Updating packages to current..."
# Work around annoying GUI recommends (fonts-droid-fallback)
apt-get install -y --no-install-recommends libgs9-common
# Do the package upgrade to bring us to the latest package versions
# Using apt for this instead of apt-get, we get a nice progress bar for longer operations.
apt full-upgrade -y
# Clean up any extra packages from the upgrade
apt-get autoremove --purge -y
echo "HOOK: Configuring git."
git config --global user.email "user@example.com"
git config --global user.name "Local User"
git config --global push.default simple
mkdir -p /home/git/
echo "HOOK: Checking out project repository..."
cd /home/git/
git clone https://user@github.com/user/project.git --depth=1
echo "hook: Attempting to customize ISO contents..."
cd /home/git/project/buildscripts/bionic/
git pull
echo "HOOK: Running customization script..."
./00-build-ubuntu-iso-from-source.sh
apt-get autoremove --purge -y
echo "HOOK: Autobuild complete."
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment