tiny-slitaz diff helper @ rev 5
refresh
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Oct 07 23:37:02 2015 +0200 (2015-10-07) |
parents | 1d33b2a53785 |
children | ac214416e736 |
line diff
1.1 --- a/helper Mon Sep 03 10:21:46 2012 +0200 1.2 +++ b/helper Wed Oct 07 23:37:02 2015 +0200 1.3 @@ -43,12 +43,15 @@ 1.4 esac 1.5 grep -qs "^$PACKAGE " $TMPDIR/uploadconf && 1.6 checked='checked="checked"' 1.7 - if [ -n "$AUTO_SELECTION" ]; then 1.8 + case "$AUTO_SELECTION" in 1.9 + never) 1.10 + checked='disabled' ;; 1.11 + always) 1.12 checked='checked="checked" disabled' 1.13 cat <<EOT 1.14 <input type="hidden" name="selected[]" value="$PACKAGE" /> 1.15 EOT 1.16 - fi 1.17 + esac 1.18 cat <<EOT 1.19 <tr> 1.20 <td><input type="checkbox" name="selected[]" value="$PACKAGE" $checked /></td> 1.21 @@ -225,7 +228,7 @@ 1.22 . $pkg 1.23 echo "$1 $VERSION $(md5sum $(dirname $pkg)/fs.cpio.lzma | awk '{ print $1 }')" >> $2/fs/etc/packages.conf 1.24 if grep -qs ^post_install $pkg; then 1.25 - . $2/vars 1.26 + [ -s $2/vars ] && . $2/vars 1.27 echo "=== $pkg: $(date) ===" >> $2/post_install.log 2>&1 1.28 post_install $2/fs >> $2/post_install.log 2>&1 1.29 sed -e 's/^export/ /' -e 's/^/ /' < $2/vars >> $2/fs/etc/packages.conf 1.30 @@ -321,8 +324,9 @@ 1.31 cp ../kernel boot/bzImage 1.32 fi 1.33 find -user bellard -exec chown root.root {} \; 1.34 - find | grep -v ^./boot | cpio -o -H newc | lzma e ../rootfs.gz -si 1.35 - lzma_set_size ../rootfs.gz 1.36 + find | grep -v ^./boot | cpio -o -H newc | gzip -9 > ../rootfs.gz 1.37 + which advdef 2> /dev/null && advdef -z4 ../rootfs.gz 1.38 + find .. -exec ls -ld {} \; > /tmp/X 1.39 fi 1.40 if [ "x$1" == "x--mkiso" ]; then 1.41 tmp=$2 1.42 @@ -330,6 +334,7 @@ 1.43 cat $tmp/fs/boot/System.map | gzip -9 > $tmp/iso/data/sysmap.gz 1.44 cat $tmp/fs/boot/config | gzip -9 > $tmp/iso/data/linconf.gz 1.45 cat $tmp/fs/boot/config-busybox | gzip -9 > $tmp/iso/data/bbconf.gz 1.46 + cp $tmp/fs/boot/bundle $tmp/iso/data/bundle.sh 1.47 cat $tmp/post_install.log | gzip -9 > $tmp/iso/data/log.gz 1.48 cp $tmp/config_files $tmp/iso/data/files.cnf 1.49 cp $tmp/fs/etc/packages.conf $tmp/iso/data/packages.cnf 1.50 @@ -352,14 +357,18 @@ 1.51 [ -x /usr/bin/isohybrid ] && 1.52 /usr/bin/isohybrid $tmp/slitaz.iso 2> /dev/null 1.53 fi 1.54 +if [ "x$1" == "x--mkexe" ]; then 1.55 + tmp=$2 1.56 + cd $tmp 1.57 + cp fs/boot/bzImage slitaz.exe 1.58 + sh fs/boot/bundle slitaz.exe rootfs.gz exe 1.59 +fi 1.60 if [ "x$1" == "x--mkimg" ]; then 1.61 tmp=$2 1.62 - exe=$PWD 1.63 cd $tmp 1.64 - $exe/bootloader fs/boot/bzImage --initrd rootfs.gz --format 0 1.65 - mv floppy. slitaz.img 1.66 -# $exe/bootloader fs/boot/bzImage --initrd rootfs.gz 1.67 -# cat floppy.* > slitaz.img && rm -f floppy.* 1.68 + cp fs/boot/bzImage slitaz.img 1.69 + sh fs/boot/bundle slitaz.img rootfs.gz floppy 1.70 + dd of=slitaz.img bs=18k seek=80 count=0 conv=notrunc 2> /dev/null 1.71 fi 1.72 if [ "x$1" == "x--mkcfg" ]; then 1.73 tmp=$2 1.74 @@ -367,3 +376,11 @@ 1.75 for i in $(sed 's#^/##' < ../config_files); do find $i; done | \ 1.76 sort | uniq | cpio -o -H newc | gzip -9 > ../config_files.cpio.gz 1.77 fi 1.78 +if [ "x$1" == "x--chkdist" ]; then 1.79 + if [ pkgs/busybox-*/fs.cpio.lzma -nt dist/rootfs.cpio ]; then 1.80 + cat pkgs/busybox-*/fs.cpio.lzma | unlzma | ( cd dist ; cpio -idmu ) 1.81 + mv -f dist/fs/* dist/ 1.82 + rmdir dist/fs 1.83 + touch dist/* 1.84 + fi 1.85 +fi