Last change
on this file since 3506 was 1885, checked in by Bruno Cornec, 17 years ago |
- Remove floppy support from mindi and mondo and adapt docs
- Align more mindi with the version from stable
|
-
Property svn:keywords
set to
Id
|
File size:
1.2 KB
|
Rev | Line | |
---|
[1] | 1 | #!/bin/sh
|
---|
[866] | 2 | #
|
---|
| 3 | # $Id: untar 1885 2008-03-01 23:38:35Z bruno $
|
---|
| 4 | #
|
---|
| 5 | ########################################################################
|
---|
[1] | 6 |
|
---|
[866] | 7 |
|
---|
[1] | 8 | Die() {
|
---|
| 9 | echo "Fatal error! $1" >> /dev/stderr
|
---|
| 10 | exit 1
|
---|
| 11 | }
|
---|
| 12 |
|
---|
| 13 |
|
---|
| 14 | # ---------------------- main ----------------------
|
---|
| 15 |
|
---|
[1885] | 16 | mountpoint=/dev/null
|
---|
[1] | 17 | [ -e "/tmp/CDROM-LIVES-HERE" ] && mountpoint=/mnt/cdrom/images
|
---|
[1734] | 18 | [ "$#" -eq "2" ] || Die "untar <tarball> <untar_to>"
|
---|
[1] | 19 | diskno=$1
|
---|
| 20 | untar_path=$2
|
---|
| 21 | tarball=$mountpoint/$diskno.tar.gz
|
---|
| 22 | if [ -e "/tmp/CDROM-LIVES-HERE" ] ; then
|
---|
| 23 | [ -e "$tarball" ] || LogIt "Can't find CD's $tarball" 1
|
---|
| 24 | fi
|
---|
| 25 |
|
---|
| 26 | [ -e "$mountpoint/LAST-DISK" ] && cp -f $mountpoint/LAST-DISK /
|
---|
| 27 | old_pwd=`pwd`
|
---|
| 28 | cd $untar_path
|
---|
| 29 | counter=0
|
---|
| 30 | for fname in `tar -zxvf $tarball` ; do
|
---|
| 31 | counter=$(($counter+1))
|
---|
| 32 | [ "$(($counter % 4))" -eq "0" ] && echo -en "\r\t\t\t\t\t\t\t\\"
|
---|
| 33 | [ "$(($counter % 4))" -eq "1" ] && echo -en "\r\t\t\t\t\t\t\t|"
|
---|
| 34 | [ "$(($counter % 4))" -eq "2" ] && echo -en "\r\t\t\t\t\t\t\t/"
|
---|
| 35 | [ "$(($counter % 4))" -eq "3" ] && echo -en "\r\t\t\t\t\t\t\t-"
|
---|
| 36 | done
|
---|
| 37 | cd $old_pwd
|
---|
| 38 | echo -e -n "\r"
|
---|
| 39 | [ ! -e "/tmp/CDROM-LIVES-HERE" ] && umount $mountpoint
|
---|
| 40 | sleep 1
|
---|
| 41 | if [ ! -e "/tmp/CDROM-LIVES-HERE" -a -f "/LAST-DISK" ] ; then
|
---|
| 42 | echo -en "Please remove the last data disk and press ENTER."
|
---|
| 43 | read line
|
---|
| 44 | fi
|
---|
| 45 | exit 0
|
---|
Note:
See
TracBrowser
for help on using the repository browser.