]> Dogcows Code - chaz/tar/blob - tests/same-order02.sh
test if -C works when used with --same-order
[chaz/tar] / tests / same-order02.sh
1 #! /bin/sh
2
3 # In previous versions a single -C option did not work with --same-order
4 # (see same-order01.sh). However, multiple -C options worked OK.
5 # Test if we did not break the correct behavior.
6
7 # This file is part of GNU tar testsuite.
8 # Copyright (C) 2004 Free Software Foundation, Inc.
9 #
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; either version 2, or (at your option)
13 # any later version.
14 #
15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
19 #
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write to the Free Software
22 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
23 # 02111-1307, USA.
24
25 . ./preset
26 . $srcdir/before
27
28 set -e
29 genfile -l 1024 > file1
30 genfile -l 1024 > file2
31 tar cf archive file1 file2
32
33 mkdir en
34 mkdir to
35
36 HERE=`pwd`
37 tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2
38
39 ls en
40 echo separator
41 ls to
42
43 out="\
44 file1
45 separator
46 file2
47 "
48
49 . $srcdir/after
This page took 0.036632 seconds and 5 git commands to generate.