]> Dogcows Code - chaz/tar/blob - tests/before
Accept an optional list of allowed archive
[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 if test $# -ne 0; then
22 case $TAR_OPTIONS in
23 --format=*) FMTOPT=$TAR_OPTIONS;;
24 *) FMTOPT=`tar --show-defaults`;;
25 esac
26
27 FORMAT=
28 for option
29 do
30 case $FMTOPT in
31 --format=$option*) FORMAT=$option
32 break;;
33 esac
34 done
35 test -z "$FORMAT" && exit 77
36 fi
This page took 0.03666 seconds and 5 git commands to generate.