Added new CFLAGS options to zlib configure instruction
[linux_from_scratch.git] / aux-file-data.sh
blob7f701772804d0c69d3a4abfb31574a79d072882d
1 #!/bin/bash
3 if [ $# -lt 1 ] ; then
4 echo "This script needs the location of the xml file to update"
5 exit 1
6 fi
8 FILE=$1
10 # Bootscript data
11 bootscripts=$(ls lfs-bootscripts*.bz2)
12 base=$(basename $bootscripts .tar.bz2)
13 bootsize=$(ls -lk $bootscripts | cut -f5 -d" ")
14 bootmd5=$(md5sum $bootscripts | cut -f1 -d" ")
16 # Figure intalled size of bootscripts
17 TOPDIR=$(pwd)
18 TMP_DIR=$(mktemp -d /tmp/lfsbootfiles.XXXXXX)
19 pushd $TMP_DIR > /dev/null
20 tar -xf $TOPDIR/$bootscripts
21 bootinstallsize=$(du -sk $TMP_DIR | cut -f1)
22 popd > /dev/null
23 rm -rf $TMP_DIR
25 sed -i -e s/BOOTSCRIPTS-SIZE/$bootsize/ \
26 -e s/BOOTSCRIPTS-INSTALL-KB/$bootinstallsize/ \
27 -e s/BOOTSCRIPTS-MD5SUM/$bootmd5/ $FILE
29 ############
31 # udev configuration tarball data
32 udevconfig=$(ls udev-config*.bz2)
33 udevsize=$(ls -lk $udevconfig | cut -f5 -d" ")
34 udevmd5=$(md5sum $udevconfig | cut -f1 -d" ")
36 sed -i -e s/UDEV-SIZE/$udevsize/ \
37 -e s/UDEV-MD5SUM/$udevmd5/ $FILE