#!/bin/sh # SQL = select mirror_baseurl from mirror_mirrors where mirror_active='1'; mirrors='[ "http://gentoo.ussg.indiana.edu/experimental/bittorrent-http-seeding/", "http://gentoo.osuosl.org/experimental/bittorrent-http-seeding/", "http://gentoo.mirrors.tds.net/pub/gentoo/experimental/bittorrent-http-seeding/", "http://mirror.datapipe.net/gentooexperimental/bittorrent-http-seeding/", "http://prometheus.cs.wmich.edu/gentooexperimental/bittorrent-http-seeding/", "http://mirror.usu.edu/mirrors/gentoo/experimental/bittorrent-http-seeding/", "http://lug.mtu.edu/gentooexperimental/bittorrent-http-seeding/", "http://mirror.mcs.anl.gov/pub/gentoo/experimental/bittorrent-http-seeding/", "http://gentoo.mirrors.easynews.com/linux/gentoo/experimental/bittorrent-http-seeding/", "http://gentoo.chem.wisc.edu/gentoo/experimental/bittorrent-http-seeding/", "http://cudlug.cudenver.edu/gentoo/experimental/bittorrent-http-seeding/", "http://adelie.polymtl.ca/experimental/bittorrent-http-seeding/", "http://mirror.espri.arizona.edu/gentoo/experimental/bittorrent-http-seeding/", "http://mirrors.acm.cs.rpi.edu/gentoo/experimental/bittorrent-http-seeding/", "http://ftp.heanet.ie/pub/gentoo/experimental/bittorrent-http-seeding/", "http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/experimental/bittorrent-http-seeding/", "http://ftp.snt.utwente.nl/pub/os/linux/gentooexperimental/bittorrent-http-seeding/", "http://mirror.switch.ch/ftp/mirror/gentoo/experimental/bittorrent-http-seeding/", "http://gentoo.inode.at/experimental/bittorrent-http-seeding/", "http://gentoo.mneisen.org/experimental/bittorrent-http-seeding/", ]' #for i in *.torrent ; do for i in *2008.0-r1*.torrent ; do ti="${i/.torrent}" [[ ${i/amd64} != ${i} ]] && arch=amd64 [[ ${i/ia64} != ${i} ]] && arch=ia64 [[ ${i/sparc64} != ${i} ]] && arch=sparc64 [[ ${i/ppc} != ${i} ]] && arch=ppc [[ ${i/970} != ${i} ]] && arch=ppc [[ ${i/g4} != ${i} ]] && arch=ppc [[ ${i/power5} != ${i} ]] && arch=ppc [[ ${i/powerpc} != ${i} ]] && arch=ppc [[ ${i/alpha} != ${i} ]] && arch=alpha [[ ${i/hppa} != ${i} ]] && arch=hppa [[ ${i/x86} != ${i} ]] && arch=x86 [[ ${i/i686} != ${i} ]] && arch=x86 title="Gentoo Linux 2008.0 - $ti" if [ "${arch/portage}" != "${arch}" ]; then comment="$title - 2008.0 Portage Tree Snapshot" else comment="$title - Arch: $arch" fi comment="${comment}$(echo ; ls -l $ti -LgG)" comment="${comment}$(echo ; cat $ti/*DIGESTS)" echo $i ~robbat2/changetorrent-console --comment "${comment}" --title "${title}" --url_list "${mirrors}" --modification_date 'NOW' --save $i #~robbat2/changetorrent-console --url_list "${mirrors}" --modification_date 'NOW' --save $i done #rl="$(readlink $ti/*DIGESTS)" #arch="$(echo "$rl" | sed -r -e 's,/release/2008.0_beta2/.*(bittorrent|experimental|releases)/,,g' -e 's,/(2008.0_beta2|stages|live).*,,g' )"