wok-stable annotate slitaz-loram-cdrom/stuff/loram.extract @ rev 765
Slitaz-loram*: restore files need by boot script
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat May 10 22:28:03 2008 +0000 (2008-05-10) |
parents | be656ac55ce8 |
children | 2857e33d1bb6 |
rev | line source |
---|---|
pascal@370 | 1 # remove link to cdrom |
pascal@370 | 2 [ -d cdrom ] && rmdir cdrom |
pascal@765 | 3 rm -f bin/vcsa2txt bin/awk bin/script bin/cut bin/readlink |
pascal@370 | 4 if [ -L usr ]; then |
pascal@370 | 5 rm usr |
pascal@370 | 6 cp -a $1/usr . |
pascal@370 | 7 fi |
pascal@370 | 8 packedfs="$1/usr.cromfs" |
pascal@370 | 9 if [ -f $packedfs ]; then |
pascal@370 | 10 rmdir usr |
pascal@370 | 11 rm -f bin/unmkcromfs |
pascal@370 | 12 cp -a $1/unmkcromfs bin/unmkcromfs |
pascal@370 | 13 bin/unmkcromfs $packedfs usr |
pascal@744 | 14 [ "${packedfs%%/*}" = ".." ] && rm -f $packedfs |
pascal@370 | 15 rm -f bin/cromfs-driver |
pascal@370 | 16 cp -a $1/cromfs-driver bin/cromfs-driver |
pascal@370 | 17 fi |
pascal@370 | 18 packedfs="$1/usr.sqfs" |
pascal@370 | 19 if [ -f $packedfs ]; then |
pascal@370 | 20 rmdir usr |
pascal@370 | 21 sbin/unsquashfs -d usr $packedfs |
pascal@744 | 22 [ "${packedfs%%/*}" = ".." ] && rm -f $packedfs |
pascal@370 | 23 fi |
pascal@370 | 24 if [ -d usr/.moved ]; then |
pascal@370 | 25 ( cd usr/.moved ; find * -print ) | \ |
pascal@370 | 26 while read file; do |
pascal@370 | 27 [ -L "$file" ] || continue |
pascal@370 | 28 rm -f "$file" |
pascal@370 | 29 mv "usr/.moved/$file" "$file" |
pascal@370 | 30 done |
pascal@370 | 31 rm -rf usr/.moved |
pascal@370 | 32 fi |