Created
January 18, 2016 16:54
-
-
Save t2d/b60dc510991e914dc95f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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