wok rev 14750
busybox-static, busybox-boot: find smaller size
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Jun 16 16:40:26 2013 +0200 (2013-06-16) |
parents | ff4ffc2d8c7a |
children | 03fe62d990c5 |
files | busybox-boot/receipt busybox-static/receipt |
line diff
1.1 --- a/busybox-boot/receipt Sun Jun 16 15:34:51 2013 +0200 1.2 +++ b/busybox-boot/receipt Sun Jun 16 16:40:26 2013 +0200 1.3 @@ -16,7 +16,14 @@ 1.4 { 1.5 jslinux=false 1.6 mkdir $fs/bin $fs/dev 1.7 - cp -a $src/busybox-static $fs/bin/busybox 1.8 + CHOICE=static 1.9 + for i in uclibc musl diet ; do 1.10 + [ -x $src/busybox-$i ] || continue 1.11 + [ $(stat -c %s $src/busybox-$i) -lt \ 1.12 + $(stat -c %s $src/busybox-$CHOICE) ] && 1.13 + CHOICE=$i 1.14 + done 1.15 + cp -a $src/busybox-$CHOICE $fs/bin/busybox 1.16 mknod -m 660 $fs/dev/console c 5 1 1.17 mknod -m 771 $fs/dev/null c 1 3 1.18 mknod -m 660 $fs/dev/tty c 5 0
2.1 --- a/busybox-static/receipt Sun Jun 16 15:34:51 2013 +0200 2.2 +++ b/busybox-static/receipt Sun Jun 16 16:40:26 2013 +0200 2.3 @@ -14,8 +14,15 @@ 2.4 # Rules to gen a SliTaz package suitable for Tazpkg. 2.5 genpkg_rules() 2.6 { 2.7 - mkdir -p $fs/usr/share/boot 2.8 - cp -a $src/busybox-static $fs/usr/share/boot 2.9 + mkdir -p $fs/usr/share/boot 2.10 + CHOICE=static 2.11 + for i in uclibc musl diet ; do 2.12 + [ -x $src/busybox-$i ] || continue 2.13 + [ $(stat -c %s $src/busybox-$i) -lt \ 2.14 + $(stat -c %s $src/busybox-$CHOICE) ] && 2.15 + CHOICE=$i 2.16 + done 2.17 + cp -a $src/busybox-$CHOICE $fs/usr/share/boot/busybox-static 2.18 } 2.19 2.20 post_install()