archboot/usr/bin/mktorrent-archboot

30 lines
782 B
Text
Raw Normal View History

2010-03-18 10:22:09 +01:00
#!/bin/bash
# install mktorrent from http://mktorrent.sourceforge.net/
# check result on e.g. http://torrenteditor.com/
if [ "${1}" = "" -o "${2}" = "" ]; then
echo "Usage: ${0} <version> <iso file>"
echo -e "\tversion:\te.g. 2009.05 or archboot/2009.05"
echo -e "\tiso file:\te.g. ./archlinux-2009.05-core-x86_64.iso"
exit 1
fi
archver="${1}"
isofile="${2}"
echo 'Creating webseeds...'
2010-07-29 14:49:57 +02:00
httpmirrorlist=$(wget http://www.archlinux.org/mirrorlist/all/http/ -q -O - \
2010-07-29 20:44:32 +02:00
- | grep 'http://' \
2010-03-18 10:22:09 +01:00
| awk "{print \$3\"/iso/${archver}/\";}" \
2010-07-29 14:49:57 +02:00
| sed -e 's#/$repo/os/$arch##' \
2010-03-18 10:22:09 +01:00
-e 's#\s*# -w#')
echo 'Building torrent...'
mktorrent \
-l 19 \
-a 'http://tracker.archlinux.org:6969/announce' \
-c "Arch Linux ${archver} (www.archlinux.org)" \
${httpmirrorlist} \
"${isofile}"