X-Git-Url: https://git.madduck.net/code/vinst.git/blobdiff_plain/e5ea710926dc73f39dc9920237d8557c79ad0e5a..0a6dba16ee37c98b2580aaa32f2f41821bba1142:/di-update?ds=sidebyside diff --git a/di-update b/di-update index 22c0d56..05e4586 100755 --- a/di-update +++ b/di-update @@ -1,7 +1,32 @@ #!/bin/sh set -eu -MIRROR=ftp://ftp2.de.debian.org/debian +: ${MIRROR:=ftp://ftp2.de.debian.org} +: ${SUBDIR:=debian/dists/%SUITE%/main/installer-%ARCH%/current/images} -cd installer-amd64 -exec wget -c -np -nH -m --cut-dirs=5 $MIRROR/dists/wheezy/main/installer-amd64/current/images/netboot +: ${ARCHS:=amd64} +: ${SUITES:=stretch} + +#: ${MIRROR_jessie:=http://d-i.debian.org} +#: ${SUBDIR_jessie:=daily-images/%ARCH%/daily/} + +for a in $ARCHS; do + + for s in $SUITES; do + + eval m=\${MIRROR_$s:-$MIRROR} + eval p=\${SUBDIR_$s:-$SUBDIR} + p=$(echo $p | sed -e "s,%ARCH%,$a,;s,%SUITE%,$s,;s,/$,,") + + # count number of path components + n=1; t=$p; while [ "${t%/*}" != "$t" ]; do t=${t%/*}; n=$((n+1)); done + + wget -np -nH -m --cut-dirs=$n \ + --directory-prefix=installer-$a/$s/current/images \ + -X $p/cdrom,$p/hd-media \ + -R index.html\* \ + $m/$p/ + + done + +done