debian-cd-clone/contrib/mktorrent

15 lines
409 B
Plaintext
Raw Normal View History

2011-02-05 08:42:04 -01: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