瀏覽代碼

Script to create Debian repos (requires aptly)

Adam Ierymenko 9 年之前
父節點
當前提交
06e2e8119e
共有 1 個文件被更改,包括 14 次插入0 次删除
  1. 14 0
      linux-build-farm/aptly-create-debian-repo.sh

+ 14 - 0
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