From 06e2e8119e9167ea85bd9fd5c023fa48db1b8c12 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 24 Jun 2016 16:23:10 -0700 Subject: [PATCH] Script to create Debian repos (requires aptly) --- linux-build-farm/aptly-create-debian-repo.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 linux-build-farm/aptly-create-debian-repo.sh diff --git a/linux-build-farm/aptly-create-debian-repo.sh b/linux-build-farm/aptly-create-debian-repo.sh new file mode 100755 index 000000000..de5df7e4a --- /dev/null +++ b/linux-build-farm/aptly-create-debian-repo.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# This builds a series of Debian repositories for each distribution. + +export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin + +for distro in debian-* ubuntu-*; do + if [ -n "`find ${distro} -name '*.deb' -type f`" ]; then + arches=`ls ${distro}/*.deb | cut -d _ -f 3 | cut -d . -f 1 | xargs | sed 's/ /,/'` + aptly repo create -architectures=${arches} -comment="ZeroTier, Inc. Debian Packages" -component="main" -distribution=${distro} zt-release-${distro} + aptly repo add zt-release-${distro} ${distro}/*.deb + aptly publish repo zt-release-${distro} ${distro} + fi +done