-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathupload-inotify
executable file
·39 lines (29 loc) · 1.16 KB
/
upload-inotify
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
set -euo pipefail
export TMPDIR=/var/tmp
workdir=$(mktemp -d)
echo Working dir is "$workdir"
pushd "$workdir" >/dev/null
echo Downloading release
dlbuild -match '\.deb' http://build.syncthing.net/job/syncthing-inotify-debian/lastSuccessfulBuild
ver=(syncthing-inotify_*_amd64.deb)
ver="${ver#syncthing-inotify_}"
ver="${ver%_amd64.deb}"
echo Release version $ver
for arch in amd64 armel armhf i386 ; do
mv "syncthing-inotify_${ver}_${arch}.deb" "$HOME/apt-dists/dists/syncthing/release/binary-$arch"
done
popd >/dev/null
rm -r "$workdir"
pushd "$HOME/apt-dists" >/dev/null
echo Generating and signing package archives
for f in dists/syncthing/release/binary-* ; do
apt-ftparchive packages "$f" > "$f/Packages.new"
mv "$f/Packages.new" "$f/Packages"
gzip -c "$f/Packages" > "$f/Packages.gz"
done
apt-ftparchive -c Releases.conf release dists/syncthing | gpg --clearsign > dists/syncthing/InRelease
apt-ftparchive -c Releases.conf release dists/syncthing > dists/syncthing/Release
gpg --detach-sign --yes -a -o dists/syncthing/Release.gpg dists/syncthing/Release
echo Uploading new distribution
rsync -va --delete --rsh="$RSYNC_RSH_CMD" dists/ "$RELEASE_ROOT/dists/"