wok-stable view slitaz-loram/stuff/loram.rootfs @ rev 1287
slitaz-loram: update tag for patch
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Aug 20 15:53:39 2008 +0000 (2008-08-20) |
parents | 1c1dad96a8f3 |
children | 52ca9fcdca28 |
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 if [ -x usr/bin/mkcromfs ]; then
26 usr/bin/mkcromfs -qq -f 262144 -b 16384 usr .usr.cromfs
27 else
28 usr/sbin/mksquashfs usr .usr.sqfs
29 fi
30 if [ -x bin/funionfs -o -x usr/bin/mkcromfs ]; then
31 mkdir .usr.ro
32 ln -s /.usr.ro/lib/$(cd usr/lib ; ls libfuse.so.2.*) lib/libfuse.so.2
33 [ -x bin/funionfs ] && mkdir .usr.rw
34 fi
35 rm -rf usr
36 mkdir usr
37 COMPRESSION="none"
38 echo "$(du -hs ./.usr.*fs | cut -f1) are used by /usr after compression"
39 for ii in bin/vcsa2txt bin/awk bin/script bin/cut bin/readlink; do
40 ln -s busybox $ii
41 done