From 1b9ec2b7c45968771ae6d2e58cca17308e49caa0 Mon Sep 17 00:00:00 2001 From: Pavel Sanda Date: Tue, 20 Feb 2018 00:45:50 +0100 Subject: [PATCH] Script for creating torrents for files stored on our ftp site. --- development/tools/create_torrent | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 development/tools/create_torrent diff --git a/development/tools/create_torrent b/development/tools/create_torrent new file mode 100755 index 0000000000..81d6ea395b --- /dev/null +++ b/development/tools/create_torrent @@ -0,0 +1,26 @@ +#!/bin/sh +#Create torrent for the bundled installers (Use only for huge files >100 MB) +#Run this script from the root of the local ftp directory structure and give it the path to the binary, e.g.: +#~/lyx-devel/development/tools/create_torrent devel/lyx-2.3/lyx-2.3.0rc2/LyX-230RC-2-Bundle-1.exe +#Putting the torrent next to binaries on ftp is enough, you don't need to mess with trackers. + +#path to bundle, from the root of ftp directory +bundle="$1" + +if ! [ -e "${bundle}" ]; then echo Wrong path. ; exit; fi + + +#the tracker here is just an excuse, in reality the backup links will be used +#in parallel by decent torrent clients while naturally solving the problem of +#selecting the fastest mirror + +mktorrent -a udp://tracker.opentrackr.org:1337/announce -l 22 -v "${bundle}" \ +-w http://ftp.lyx.org/pub/lyx/"${bundle}" \ +-w http://ftp.ntua.gr/pub/X11/LyX/"${bundle}" \ +-w http://ftp.icm.edu.pl/packages/lyx/"${bundle}" \ +-w http://mirror.ufs.ac.za/applications/lyx/"${bundle}" \ +-w ftp://ftp.lyx.org/pub/lyx/"${bundle}" \ +-w ftp://ftp.ntua.gr/pub/X11/LyX/"${bundle}" \ +-w ftp://ftp.icm.edu.pl/packages/lyx/"${bundle}" \ +-w ftp://mirror.ufs.ac.za/applications/lyx/"${bundle}" \ +-w ftp://ftp.ucsd.edu/LyX/"${bundle}"