diff --git a/contrib/mktorrent b/contrib/mktorrent index 674d0e1c..c4e518f1 100755 --- a/contrib/mktorrent +++ b/contrib/mktorrent @@ -1,14 +1,23 @@ #!/bin/sh +HTTPBASE="http://cdimage.debian.org/cdimage" + for FILE in $@; do - MKTORRENT=/home/debian-cd/bt/btmakemetafile.py + MKTORRENT=btmakemetafile.bittornado ISODIR=`dirname $FILE` BTDIR=`echo $ISODIR | sed 's/iso-/bt-/;s/usb-/bt-/'` if [ ! -d $BTDIR ] ; then mkdir -p $BTDIR fi + + # Add 2 http seeds: the release path *and* the archive path - + # hopefully clients will use whichever is available! + VER=$(echo ${FILE} | sed 's,^.*/debian-,,;s,-.*$,,') + HTTP1="${HTTPBASE}/release/${VER}/${FILE}" + HTTP2="${HTTPBASE}/archive/${VER}/${FILE}" $MKTORRENT http://bttracker.debian.org:6969/announce \ --comment '"Debian CD from cdimage.debian.org"' \ + --httpseeds ${HTTP1}\|${HTTP2} \ $FILE | grep -v complete mv $FILE.torrent $BTDIR done