deploy debrif kernel and initrd
authorDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 27 Jul 2009 14:11:41 +0000 (14:11 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 27 Jul 2009 14:11:41 +0000 (14:11 +0000)
bin/install-iso.sh

index b81510b..6813902 100755 (executable)
@@ -6,11 +6,19 @@ cd iso
 test -d mnt || mkdir mnt
 sudo umount mnt
 
-to=../tftp/tinycore/
-url=http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/release/
-
-latest=`wget -q -O - $url | cut -d\" -f6 | grep '\.iso$'`
-wget -nc $url/$latest
-sudo mount $latest mnt -o loop
-ls -alR mnt/
-cp -v mnt/boot/* $to
+
+function fetch_iso() {
+
+       latest=`wget -q -O - $1 | grep '\.iso' | sed 's/^.*"\([^"]*\.iso\)".*$/\1/' | head -1`
+
+       wget -nc $1/$latest
+       sudo mount $latest mnt -o loop
+       ls -alR mnt/
+       test -d $3 || mkdir $3
+       cp -v $2 $3
+       sudo umount mnt
+
+}
+
+fetch_iso http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/release/ mnt/boot/* ../tftp/tinycore/
+fetch_iso http://cmrg.mayfirst.org/debirf/ mnt/*2.6* ../tftp/debirf