4 echo "This script needs the location of the xml file to update"
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
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)
25 sed -i -e s
/BOOTSCRIPTS-SIZE
/$bootsize/ \
26 -e s
/BOOTSCRIPTS-INSTALL-KB
/$bootinstallsize/ \
27 -e s
/BOOTSCRIPTS-MD5SUM
/$bootmd5/ $FILE
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