Subversion Repositories svn LFS-FR

Rev

Rev 1346 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
604 texou 1
#!/bin/bash
2
 
3
if [ $# -lt 1 ] ; then
4
  echo "This script needs the location of the xml file to update"
5
  exit 1
6
fi
7
 
8
FILE=$1
9
 
10
# Bootscript data
1401 jmengual 11
bootscripts=$(ls hlfs-bootscripts*.bz2)
604 texou 12
base=$(basename $bootscripts .tar.bz2)
13
bootsize=$(ls -lk $bootscripts | cut -f5 -d" ")
14
bootmd5=$(md5sum $bootscripts | cut -f1 -d" ")
15
 
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
24
 
25
sed -i -e s/BOOTSCRIPTS-SIZE/$bootsize/              \
26
       -e s/BOOTSCRIPTS-INSTALL-KB/$bootinstallsize/ \
710 texou 27
       -e s/BOOTSCRIPTS-MD5SUM/$bootmd5/ $FILE
604 texou 28
 
29
############
30
 
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" ")
35
 
36
sed -i -e s/UDEV-SIZE/$udevsize/ \
37
       -e s/UDEV-MD5SUM/$udevmd5/ $FILE
38