Created
July 10, 2018 10:45
-
-
Save norrs/a1e911b312d0ae5ac1ad26b57d7edf7f to your computer and use it in GitHub Desktop.
fetch.bash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -xe | |
INSTALLER_DEST=$1 | |
DEBINSTROOT=http://ftp.no.debian.org/debian/dists | |
DEBINSTROOT2=https://d-i.debian.org/daily-images #/amd64/daily/netboot/ | |
FWTMP=/tmp/d-i_firmware | |
mkdir -p ${INSTALLER_DEST}/{sid,buster,stretch}/{amd64,i386} | |
for DIST in sid buster stretch | |
do | |
rm -rf $FWTMP | |
mkdir -p $FWTMP/firmware | |
wget http://cdimage.debian.org/cdimage/unofficial/non-free/firmware/${DIST}/current/firmware.tar.gz -O $FWTMP/firmware.tar.gz | |
(cd $FWTMP; tar -C firmware -zxf firmware.tar.gz) | |
(cd $FWTMP; pax -x sv4cpio -s'%firmware%/firmware%' -w firmware | gzip -c >firmware.cpio.gz) | |
for ARCH in amd64; | |
do | |
for FILE in initrd.gz linux | |
do | |
#wget ${DEBINSTROOT}/${DIST}/main/installer-${ARCH}/current/images/netboot/debian-installer/${ARCH}/${FILE} \ | |
wget ${DEBINSTROOT2}/${ARCH}/daily/netboot/debian-installer/${ARCH}/${FILE} \ | |
-O ${INSTALLER_DEST}/${DIST}/${ARCH}/${FILE} | |
done | |
cat ${INSTALLER_DEST}/${DIST}/${ARCH}/initrd.gz $FWTMP/firmware.cpio.gz > ${INSTALLER_DEST}/${DIST}/${ARCH}/initrdfw.gz | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment