Skip to content

Instantly share code, notes, and snippets.

@fredldotme
Forked from flexiondotorg/preseed-snaps.sh
Created June 9, 2021 19:10
Show Gist options
  • Save fredldotme/d8fda67da20bdea69069dd1d0eaea349 to your computer and use it in GitHub Desktop.
Save fredldotme/d8fda67da20bdea69069dd1d0eaea349 to your computer and use it in GitHub Desktop.
Pre-seed snaps
#!/usr/bin/env bash
if [ -f build-settings.sh ]; then
source build-settings.sh
else
echo "ERROR! Could not source build-settings.sh."
exit 1
fi
SEED_DIR="/var/lib/snapd/seed"
SEED_DIR="$HOME/seed"
# Preseeded snaps should be downloaded from a versioned channel
# Only required on Ubuntu distros.
SEED_CHANNEL="stable/ubuntu-${REL_VER}"
snap known model > generic.model
snap prepare-image --arch amd64 --classic generic.model --snap=core18 --snap=gnome-3-28-1804 --snap=gtk-common-themes --snap=ubuntu-mate-welcome=${SEED_CHANNEL} --snap=snap-store "${SEED_DIR}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment