Skip to content

Commit

Permalink
create and upload a torrentfile when stable isos are generated (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
kgrubb authored Feb 25, 2020
1 parent 1f78ce6 commit 9aadb02
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,22 @@ while IFS= read -r ISOPATH; do
python3 upload.py "$KEY" "$SECRET" "$ENDPOINT" "$BUCKET" "$SHAPATH" "$SHASUM" || exit 1
echo "uploading $MD5..."
python3 upload.py "$KEY" "$SECRET" "$ENDPOINT" "$BUCKET" "$MD5PATH" "$MD5" || exit 1

if [ "$CHANNEL" == "stable" ]; then
# install transmission
apt-get install -y transmission-cli
cd "$(dirname "$ISOPATH")" || exit 1
# create torrent file
transmission-create "$(basename "$ISOPATH")" \
-t https://ashrise.com:443/phoenix/announce \
-t udp://open.demonii.com:1337/announce \
-t udp://tracker.ccc.de:80/announce \
-t udp://tracker.istole.it:80/announce \
-t udp://tracker.openbittorrent.com:80/announce \
-t udp://tracker.publicbt.com:80/announce
cd ~- || exit 1
echo "uploading $ISO.torrent..."
python3 upload.py "$KEY" "$SECRET" "$ENDPOINT" "$BUCKET" "$ISOPATH.torrent" "$ISO.torrent" || exit 1

fi
done <<< "$ISOPATHS"

0 comments on commit 9aadb02

Please sign in to comment.