diff options
author | Bruce Dubbs <bdubbs@linuxfromscratch.org> | 2008-06-03 21:51:14 +0000 |
---|---|---|
committer | Bruce Dubbs <bdubbs@linuxfromscratch.org> | 2008-06-03 21:51:14 +0000 |
commit | 1c4800743d22d675ccfa48364d8aa558e8b7407c (patch) | |
tree | ca4254cbe5dd5adb0ed8af1f87c26bc569403164 /aux-file-data.sh | |
parent | 9faa3e27afb932894ace74854fbb76631022446b (diff) |
Moved bootscripts and udev-config to BOOK
Updated Makefile to automatically generate bootscript and udev-config tarballs
Updated licesnse to be the same as BLFS
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8548 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'aux-file-data.sh')
-rwxr-xr-x | aux-file-data.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/aux-file-data.sh b/aux-file-data.sh new file mode 100755 index 000000000..8df4ac2cd --- /dev/null +++ b/aux-file-data.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +if [ $# -lt 1 ] ; then + echo "This script needs the location of the xml file to update" + exit 1 +fi + +FILE=$1 + +# Bootscript data +bootscripts=$(ls lfs-bootscripts*.bz2) +base=$(basename $bootscripts .tar.bz2) +bootsize=$(ls -lk $bootscripts | cut -f5 -d" ") +bootmd5=$(md5sum $bootscripts | cut -f1 -d" ") + +# Figure intalled size of bootscripts +TOPDIR=$(pwd) +TMP_DIR=$(mktemp -d /tmp/lfsbootfiles.XXXXXX) +pushd $TMP_DIR > /dev/null +tar -xf $TOPDIR/$bootscripts +bootinstallsize=$(du -sk $TMP_DIR | cut -f1) +popd > /dev/null +rm -rf $TMP_DIR + +sed -i -e s/BOOTSCRIPTS-SIZE/$bootsize/ \ + -e s/BOOTSCRIPTS-INSTALL-KB/$bootinstallsize/ \ + -e s/BOOTSCRIPTS-MD5SUM/$bootmd5/ $FILE + +############ + +# udev configuration tarball data +udevconfig=$(ls udev-config*.bz2) +udevsize=$(ls -lk $udevconfig | cut -f5 -d" ") +udevmd5=$(md5sum $udevconfig | cut -f1 -d" ") + +sed -i -e s/UDEV-SIZE/$udevsize/ \ + -e s/UDEV-MD5SUM/$udevmd5/ $FILE + |