wok-6.x view slitaz-loram/stuff/loram.rootfs @ rev 3132
rage: update build_depends
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed May 20 11:38:24 2009 +0200 (2009-05-20) |
parents | 60e0be516392 |
children | 6509db5aa948 |
line source
1 echo "$(du -hs ./usr | cut -f1) were used by /usr"
2 lib/ld-*.so --list ./sbin/insmod | grep /usr/lib | cut -d\ -f3 | \
3 while read ii; do
4 mv .${ii%%.so.*}.so* ./lib
5 done
6 for ii in /sbin /lib /bin; do
7 mkdir -p ./usr/.moved$ii
8 for j in e2fsprogs pcmciautils cpio syslinux-extra isapnptools ncurses \
9 libcap; do
10 for k in $(grep -s ^$ii ./var/lib/tazpkg/installed/$j/files.list) ; do
11 [ -f .$k ] || continue
12 mv .$k ./usr/.moved$k
13 ln -s /usr/.moved$k .$k
14 done
15 done
16 done
17 for ii in /var/lib/tazpkg/installed ; do
18 j=$(dirname /usr/.moved$ii)
19 mkdir -p .$j
20 mv .$ii .$j
21 ln -s /usr/.moved$ii .$ii
22 done
23 echo "$(du -hs ./usr/.moved | cut -f1) have been moved into /usr"
24 echo "$(du -hs ./usr | cut -f1) were used by /usr before compression"
25 usr=usr
26 if [ -x usr/bin/mkcromfs ]; then
27 usr/bin/mkcromfs -qq -f 262144 -b 16384 usr .usr.cromfs
28 else
29 usr/sbin/mksquashfs usr .usr.sqfs
30 fi
31 if [ -x bin/funionfs -o -d /var/lib/tazpkg/installed/aufs ]; then
32 mkdir .usr.rw .usr.ro
33 usr=.usr.ro
34 fi
35 if [ -x bin/funionfs -o -x usr/bin/mkcromfs ]; then
36 ln -s /$usr/lib/$(cd usr/lib ; ls libfuse.so.2.*) lib/libfuse.so.2
37 fi
38 rm -rf usr
39 mkdir usr
40 COMPRESSION="gzip"
41 echo "$(du -hs ./.usr.*fs | cut -f1) are used by /usr after compression"
42 for ii in bin/vcsa2txt bin/awk bin/script bin/cut bin/readlink bin/du bin/free \
43 bin/killall5 bin/seq ; do
44 [ -e $ii ] || ln -s busybox $ii
45 done