diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-07-05 12:30:58 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-07-05 12:30:58 -0700 |
commit | 97ec88e346b2cdaa939e9af243eaed9a54ce65f6 (patch) | |
tree | 4c727fbd66b5457fe1e068dc0e51f87ba7a32507 | |
parent | 192bc4fcf0b11d2292e0e69f286ba16d40981649 (diff) | |
download | infinitytier-97ec88e346b2cdaa939e9af243eaed9a54ce65f6.tar.gz infinitytier-97ec88e346b2cdaa939e9af243eaed9a54ce65f6.zip |
.
-rwxr-xr-x | linux-build-farm/make-rpm-repos.sh | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/linux-build-farm/make-rpm-repos.sh b/linux-build-farm/make-rpm-repos.sh index cbcaa9bf..d669501b 100755 --- a/linux-build-farm/make-rpm-repos.sh +++ b/linux-build-farm/make-rpm-repos.sh @@ -6,12 +6,30 @@ GPG_KEY=contact@zerotier.com rm -rf /tmp/zt-rpm-repo mkdir /tmp/zt-rpm-repo -cp `find . -type f -name '*.rpm'` /tmp/zt-rpm-repo -for rpm in /tmp/zt-rpm-repo/*.rpm; do - rpmsign --resign --key-id=$GPG_KEY --digest-algo=sha256 $rpm +for distro in centos-* fedora-* amazon-*; do + dname=`echo $distro | cut -d '-' -f 1` + if [ "$dname" = "centos" ]; then + dname=el + fi + if [ "$dname" = "fedora" ]; then + dname=fc + fi + if [ "$dname" = "amazon" ]; then + dname=amzn1 + fi + dvers=`echo $distro | cut -d '-' -f 2` + + mkdir -p /tmp/zt-rpm-repo/$dname/$dvers + + cp -v $distro/*.rpm /tmp/zt-rpm-repo/$dname/$dvers done -createrepo --database /tmp/zt-rpm-repo +rpmsign --resign --key-id=$GPG_KEY --digest-algo=sha256 `find /tmp/zt-rpm-repo -type f -name '*.rpm'` + +for db in `find /tmp/zt-rpm-repo -mindepth 2 -maxdepth 2 -type d`; do + createrepo --database $db +done +echo echo Repo created in /tmp/zt-rpm-repo |