tazwok rev 84
Auto create EXTRAVERSION for modules
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Aug 02 17:58:58 2008 +0000 (2008-08-02) |
parents | c55016507431 |
children | 8d7774fb16b5 |
files | tazwok |
line diff
1.1 --- a/tazwok Thu Jul 24 12:39:34 2008 +0000 1.2 +++ b/tazwok Sat Aug 02 17:58:58 2008 +0000 1.3 @@ -493,6 +493,13 @@ 1.4 LAST_FILE="$file" 1.5 done > files.list 1.6 status 1.7 + if [ -z "$EXTRAVERSION" ]; then 1.8 + case "$PACKAGE" in 1.9 + linux*);; 1.10 + *) EXTRAVERSION="$(grep '/lib/modules/.*-slitaz/' files.list \ 1.11 + head -1 | sed 's|/lib/modules/\(.*\)-slitaz/.*|_\1|')";; 1.12 + esac 1.13 + fi 1.14 echo -n "Creating md5sum of files..." 1.15 while read file; do 1.16 [ -L "fs$file" ] && continue 1.17 @@ -501,12 +508,14 @@ 1.18 done < files.list > md5sum 1.19 status 1.20 [ -s md5sum ] || rm -f md5sum 1.21 - UNPACKED_SIZE=$(du -hs . | awk '{ print $1 }') 1.22 + UNPACKED_SIZE=$(du -chs fs receipt files.list md5sum description.txt \ 1.23 + 2> /dev/null | awk '{ sz=$1 } END { print sz }') 1.24 # Build cpio archives. Find, cpio and gzip the fs, finish by 1.25 # removing the fs tree. 1.26 echo -n "Compressing the fs... " 1.27 find fs -print | cpio -o -H newc | gzip > fs.cpio.gz && rm -rf fs 1.28 - PACKED_SIZE=$(du -hs . | awk '{ print $1 }') 1.29 + PACKED_SIZE=$(du -chs fs.cpio.gz receipt files.list md5sum \ 1.30 + description.txt 2> /dev/null | awk '{ sz=$1 } END { print sz }') 1.31 echo -n "Undating receipt sizes..." 1.32 sed -i s/^PACKED_SIZE.*$// receipt 1.33 sed -i s/^UNPACKED_SIZE.*$// receipt