Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@t2d
Created January 18, 2016 16:54
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 t2d/b60dc510991e914dc95f to your computer and use it in GitHub Desktop.
Save t2d/b60dc510991e914dc95f to your computer and use it in GitHub Desktop.
#!/bin/sh
DATE=$(date --rfc-3339=date)
NAME=trusty-${DATE}
# create snapshot of each repo
{% for repo in aptly_mirrors %}
aptly mirror update {{ repo.name }}
aptly snapshot create {{ repo.name }}-${DATE} from mirror {{ repo.name }}
{% endfor %}
# merge all in one
aptly snapshot merge ${NAME} {% for repo in aptly_mirrors %}{{ repo.name }}-${DATE} {% endfor %}
# publish snapshot as repo
aptly publish snapshot -distribution="${DATE}" ${NAME}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment