debian-cd-clone/tools/make-firmware-image

31 lines
537 B
Plaintext
Raw Normal View History

#!/bin/sh
set -e
MIRROR=$1
SUITE=$2
TMPDIR=$3
export LC_ALL=C
if [ "$MIRROR"x = ""x ] || [ "$SUITE"x = ""x ] || [ "$TMPDIR"x = ""x ] ; then
echo "$0: Need parameters"
exit 1
fi
rm -rf $TMPDIR/firmware
mkdir -p $TMPDIR/firmware
FILES=`zcat $MIRROR/dists/$SUITE/non-free/binary-*/Packages.gz | \
awk '
/^Filename:.*firmware/ {print $2}
/^Filename:.*microcode/ {print $2}
' | sort -u`
for file in $FILES; do
cp $MIRROR/$file $TMPDIR/firmware/
done
cd $TMPDIR/firmware
tar czf ../firmware.tar.gz .
zip -9r ../firmware.zip .