ZeroTierOne/attic/linux-build-farm/make-apt-repos.sh

17 lines
702 B
Bash
Raw Normal View History

2016-06-30 23:44:22 +00:00
#!/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/ /,/g'`
distro_name=`echo $distro | cut -d '-' -f 2`
echo '---' $distro / $distro_name / $arches
2016-07-01 01:03:06 +00:00
aptly repo create -architectures=${arches} -comment="ZeroTier, Inc. Debian Packages" -component="main" -distribution=${distro_name} zt-release-${distro_name}
aptly repo add zt-release-${distro_name} ${distro}/*.deb
aptly publish repo zt-release-${distro_name} $distro_name
2016-06-30 23:44:22 +00:00
fi
done