]> git.madduck.net Git - code/vinst.git/blobdiff - di-update

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

enable i386 arch
[code/vinst.git] / di-update
index 22c0d56b2ceffb6244b9b8f5f2489996666d84fd..127a319f43fb00b0c19413ec2e961325c03bb2f4 100755 (executable)
--- a/di-update
+++ b/di-update
@@ -1,7 +1,32 @@
 #!/bin/sh
 set -eu
 
 #!/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 i386}
+: ${SUITES:=wheezy jessie}
+
+: ${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 -c -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