wok-stable diff slitaz-loram-cdrom/stuff/loram.extract @ rev 370

Slitaz-loram*: more flexible
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Mar 08 11:30:12 2008 +0000 (2008-03-08)
parents
children c4e6b92f665f
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/slitaz-loram-cdrom/stuff/loram.extract	Sat Mar 08 11:30:12 2008 +0000
     1.3 @@ -0,0 +1,32 @@
     1.4 +# remove link to cdrom
     1.5 +[ -d cdrom ] && rmdir cdrom
     1.6 +rm -f bin/vcsa2txt bin/script bin/cut bin/readlink
     1.7 +if [ -L usr ]; then
     1.8 +	rm usr
     1.9 +	cp -a $1/usr .
    1.10 +fi
    1.11 +packedfs="$1/usr.cromfs"
    1.12 +if [ -f $packedfs ]; then
    1.13 +	rmdir usr
    1.14 +	rm -f bin/unmkcromfs
    1.15 +	cp -a $1/unmkcromfs bin/unmkcromfs
    1.16 +	bin/unmkcromfs $packedfs usr
    1.17 +	[ "${packedfs%%/*]" = ".." ] && rm -f $packedfs
    1.18 +	rm -f bin/cromfs-driver
    1.19 +	cp -a $1/cromfs-driver bin/cromfs-driver
    1.20 +fi
    1.21 +packedfs="$1/usr.sqfs"
    1.22 +if [ -f $packedfs ]; then
    1.23 +	rmdir usr
    1.24 +	sbin/unsquashfs -d usr $packedfs
    1.25 +	[ "${packedfs%%/*]" = ".." ] && rm -f $packedfs
    1.26 +fi
    1.27 +if [ -d usr/.moved ]; then
    1.28 +	( cd usr/.moved ; find * -print ) | \
    1.29 +	while read file; do
    1.30 +		[ -L "$file" ] || continue
    1.31 +		rm -f "$file"
    1.32 +		mv "usr/.moved/$file" "$file"
    1.33 +	done
    1.34 +	rm -rf usr/.moved
    1.35 +fi