7fcd6c17d6dc6e48168d5f706fe79bb1fcd662fe
[debian/dump] / debian / patches / bashism_in_examples
1 Description: fix bashisms in dump_disk example script
2  Three conditionals in the examples/dump_on_cd_3/dump_disk are fixed to
3  avoid bash-specific syntax.
4 Author: Bdale Garbee <bdale@gag.com>
5 Bug-Debian: http://bugs.debian.org/489570
6
7 --- dump-0.4b44.orig/examples/dump_on_cd_3/dump_disk
8 +++ dump-0.4b44/examples/dump_on_cd_3/dump_disk
9 @@ -55,14 +55,14 @@ write_output() {
10         while [ "$ANSWER" != "y" ] ; do
11                 echo -n "Is the disk ready? (y/n) "
12                 read  </dev/tty ANSWER
13 -               if [ "$ANSWER" == "y" ] ; then
14 +               if [ "$ANSWER" = "y" ] ; then
15                         (${RECORD_BIN}${1}) &
16                         return 0
17 -               elif [ "$ANSWER" == "n" ] ; then
18 +               elif [ "$ANSWER" = "n" ] ; then
19                         EXIT=""
20                         echo -n "Do you really want to exit? (y/n) "
21                         read </dev/tty EXIT
22 -                       if [ "$EXIT" == "y" ] ; then
23 +                       if [ "$EXIT" = "y" ] ; then
24                                 return 1
25                         fi
26                 fi