]> Dogcows Code - chaz/tar/blob - tests/before
Move testing of the prerequisite archive formats
[chaz/tar] / tests / before
1 #! /bin/sh
2 # Do common operations before a particular test.
3
4 mkdir tmp-$$
5 cd tmp-$$
6
7 case $srcdir in
8 /*|~*) ;;
9 *) srcdir=../$srcdir ;;
10 esac
11
12 out=
13 err=
14
15 echo $0 > checking
16 exec 1> stdout
17 exec 2> stderr
18
19 PATH=..:../../src:$PATH
20
21 prereq() {
22 if test $# -ne 0; then
23 case $TAR_OPTIONS in
24 --format=*) FMTOPT=$TAR_OPTIONS;;
25 *) FMTOPT=`tar --show-defaults`;;
26 esac
27
28 FORMAT=
29 for option
30 do
31 case $FMTOPT in
32 --format=$option*) FORMAT=$option
33 break;;
34 esac
35 done
36 test -z "$FORMAT" && exit 77
37 fi
38 }
This page took 0.045239 seconds and 5 git commands to generate.