"Fossies" - the Fresh Open Source Software Archive 
Member "afio-2.5.2/script2/restore" (30 Nov 2018, 840 Bytes) of package /linux/misc/afio-2.5.2.tgz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
1 #!/bin/sh
2 # This DOES work with the Zsh (which is the only shell
3 # on my emergancy boot/root disk).
4
5 # Required:
6 # afio (2.3.6-dpg-1 or higher), gzip
7 # Optional:
8 # test (required if it's not a shell builtin)
9
10 # Function to prompt for possible restore and maybe do so
11 AFIO ()
12 {
13 local foo
14
15 echo -n "$1 ($2 in $3) restore, \"go\" to continue, other to skip: "
16 read foo
17 if test "$foo" = "go"; then
18 # If the archive is damaged, you should add the -k flag to afio.
19 # You could tell afio they're floppies, but that's much slower!
20 # afio -ivxFZ -b 1024 -s $2 $3
21 afio -ivxZ -b 1024 $3
22 fi
23 }
24
25 # This is where I mount my normal root fs from the backup fs.
26 cd /mnt/root
27
28 AFIO home 720k /dev/fd0
29 AFIO . 1440k /dev/fd0
30 AFIO home/ftp/pub 1440k /dev/fd0
31 AFIO "X11/TeX" 720k /dev/fd0
32 AFIO "man/info" 720k /dev/fd0
33 AFIO "emacs" 720k /dev/fd0