wok-current view slitaz-loram/stuff/loram.rootfs @ rev 4967
Fix: amsn DEPENDS (Thanks davesurrey and Nik)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue Feb 23 21:36:47 2010 +0100 (2010-02-23) |
parents | d9ddcc6d973c |
children | fa0257184d3c |
line source
1 echo "$(du -hs ./usr | cut -f1) were used by /usr"
2 for j in insmod unmkcromfs unsquashfs ; do
3 lib/ld-*.so --list *bin/$j 2> /dev/null | grep /usr/lib | cut -d\ -f3 | \
4 while read ii; do
5 mv .${ii%%.so.*}.so* ./lib
6 done
7 done
8 for ii in /sbin /lib /bin; do
9 mkdir -p ./usr/.moved$ii
10 for j in e2fsprogs pcmciautils cpio syslinux-extra isapnptools ncurses \
11 libcap; do
12 for k in $(grep -s ^$ii ./var/lib/tazpkg/installed/$j/files.list) ; do
13 [ -f .$k ] || continue
14 mv .$k ./usr/.moved$k
15 ln -s /usr/.moved$k .$k
16 done
17 done
18 done
19 for ii in /var/lib/tazpkg/installed ; do
20 j=$(dirname /usr/.moved$ii)
21 mkdir -p .$j
22 mv .$ii .$j
23 ln -s /usr/.moved$ii .$ii
24 done
25 echo "$(du -hs ./usr/.moved | cut -f1) have been moved into /usr"
26 echo "$(du -hs ./usr | cut -f1) were used by /usr before compression"
27 usr=usr
28 if [ -x usr/bin/mkcromfs ]; then
29 usr/bin/mkcromfs -qq -f 262144 -b 16384 usr .usr.cromfs
30 else
31 usr/sbin/mksquashfs usr .usr.sqfs -comp lzma
32 fi
33 if [ -x bin/funionfs -o -d /var/lib/tazpkg/installed/aufs ]; then
34 mkdir .usr.rw .usr.ro
35 usr=.usr.ro
36 fi
37 if [ -x bin/funionfs -o -x usr/bin/mkcromfs ]; then
38 ln -s /$usr/lib/$(cd usr/lib ; ls libfuse.so.2.*) lib/libfuse.so.2
39 fi
40 rm -rf usr
41 mkdir usr
42 COMPRESSION="gzip"
43 echo "$(du -hs ./.usr.*fs | cut -f1) are used by /usr after compression"
44 for ii in bin/vcsa2txt bin/awk bin/script bin/cut bin/readlink bin/du bin/free \
45 bin/killall5 bin/seq bin/find bin/xargs bin/patch; do
46 [ -e $ii ] || ln -s busybox $ii
47 done