aptly-create-debian-repo.sh 585 B

1234567891011121314
  1. #!/bin/bash
  2. # This builds a series of Debian repositories for each distribution.
  3. export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin
  4. for distro in debian-* ubuntu-*; do
  5. if [ -n "`find ${distro} -name '*.deb' -type f`" ]; then
  6. arches=`ls ${distro}/*.deb | cut -d _ -f 3 | cut -d . -f 1 | xargs | sed 's/ /,/'`
  7. aptly repo create -architectures=${arches} -comment="ZeroTier, Inc. Debian Packages" -component="main" -distribution=${distro} zt-release-${distro}
  8. aptly repo add zt-release-${distro} ${distro}/*.deb
  9. aptly publish repo zt-release-${distro} ${distro}
  10. fi
  11. done