diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-06-30 16:44:22 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-06-30 16:44:22 -0700 |
commit | 751497a748397ea267d31d00bd23f8b9dc286475 (patch) | |
tree | aadcdd41524be8ac60da015dc24318e01849786b | |
parent | c714e8baa6a634d2a7cc783d8e3ce6ce08a59ddb (diff) | |
download | infinitytier-751497a748397ea267d31d00bd23f8b9dc286475.tar.gz infinitytier-751497a748397ea267d31d00bd23f8b9dc286475.zip |
aptly script
-rw-r--r-- | linux-build-farm/README.md | 2 | ||||
-rwxr-xr-x | linux-build-farm/aptly.sh | 16 |
2 files changed, 18 insertions, 0 deletions
diff --git a/linux-build-farm/README.md b/linux-build-farm/README.md index c55e7300..c0c8325f 100644 --- a/linux-build-farm/README.md +++ b/linux-build-farm/README.md @@ -4,3 +4,5 @@ Dockerized Linux Build Farm This subfolder contains Dockerfiles and a script to build Linux packages for a variety of Linux distributions. It's also an excellent way to test your CPU fans and stress test your disk. Running `build.sh` with no arguments builds everything. You can run `build.sh` with the name of a distro (e.g. centos-7) to only build that. Both 32 and 64 bit packages are built except where no 32-bit version of the distribution exists. + +The `aptly.sh` script creates Debian repositories with *aptly*. You will need it installed. Be careful if you have an existing *aptly* configuration since this may mess with it. diff --git a/linux-build-farm/aptly.sh b/linux-build-farm/aptly.sh new file mode 100755 index 00000000..8f96d3a0 --- /dev/null +++ b/linux-build-farm/aptly.sh @@ -0,0 +1,16 @@ +#!/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 + aptly repo create -architectures=${arches} -comment="ZeroTier, Inc. Debian Packages" -component="main" -distribution=${distro_name} zt-release-${distro} + aptly repo add zt-release-${distro} ${distro}/*.deb + aptly publish repo zt-release-${distro} ${distro_name} + fi +done |