Skip to content

Commit 9aadb02

Browse files
authored
create and upload a torrentfile when stable isos are generated (#296)
1 parent 1f78ce6 commit 9aadb02

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

upload.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,22 @@ while IFS= read -r ISOPATH; do
4343
python3 upload.py "$KEY" "$SECRET" "$ENDPOINT" "$BUCKET" "$SHAPATH" "$SHASUM" || exit 1
4444
echo "uploading $MD5..."
4545
python3 upload.py "$KEY" "$SECRET" "$ENDPOINT" "$BUCKET" "$MD5PATH" "$MD5" || exit 1
46+
47+
if [ "$CHANNEL" == "stable" ]; then
48+
# install transmission
49+
apt-get install -y transmission-cli
50+
cd "$(dirname "$ISOPATH")" || exit 1
51+
# create torrent file
52+
transmission-create "$(basename "$ISOPATH")" \
53+
-t https://ashrise.com:443/phoenix/announce \
54+
-t udp://open.demonii.com:1337/announce \
55+
-t udp://tracker.ccc.de:80/announce \
56+
-t udp://tracker.istole.it:80/announce \
57+
-t udp://tracker.openbittorrent.com:80/announce \
58+
-t udp://tracker.publicbt.com:80/announce
59+
cd ~- || exit 1
60+
echo "uploading $ISO.torrent..."
61+
python3 upload.py "$KEY" "$SECRET" "$ENDPOINT" "$BUCKET" "$ISOPATH.torrent" "$ISO.torrent" || exit 1
62+
63+
fi
4664
done <<< "$ISOPATHS"

0 commit comments

Comments
 (0)