debian-cd-clone/wheezy/contrib/mktorrent

15 lines
409 B
Plaintext
Raw Normal View History

2013-05-06 13:08:31 +00:00
#!/bin/sh
for FILE in $@; do
MKTORRENT=/home/debian-cd/bt/btmakemetafile.py
ISODIR=`dirname $FILE`
BTDIR=`echo $ISODIR | sed 's/iso-/bt-/;s/usb-/bt-/'`
if [ ! -d $BTDIR ] ; then
mkdir -p $BTDIR
fi
$MKTORRENT http://bttracker.debian.org:6969/announce \
--comment '"Debian CD from cdimage.debian.org"' \
$FILE | grep -v complete
mv $FILE.torrent $BTDIR
done