]> Dogcows Code - chaz/tar/blob - tests/incremen.sh
Use prereq() instead of passing arguments to 'before'.
[chaz/tar] / tests / incremen.sh
1 #! /bin/sh
2 # A directory older than the listed entry was skipped completely.
3
4 . ./preset
5 . $srcdir/before
6 prereq gnu oldgnu
7
8 set -e
9 mkdir structure
10 echo x >structure/file
11
12 # On Nextstep (and perhaps other 4.3BSD systems),
13 # a newly created file's ctime isn't updated
14 # until the next sync or stat operation on the file.
15 ls -l structure/file >/dev/null
16
17 # If the time of an initial backup and the creation time of a file contained
18 # in that backup are the same, the file will be backed up again when an
19 # incremental backup is done, because the incremental backup backs up
20 # files created `on or after' the initial backup time. Without the sleep
21 # command, behaviour of tar becomes variable, depending whether the system
22 # clock ticked over to the next second between creating the file and
23 # backing it up.
24 sleep 1
25
26 tar cf archive --listed=list structure
27 tar cfv archive --listed=list structure
28 echo -----
29 sleep 1
30 echo y >structure/file
31 tar cfv archive --listed=list structure
32
33 out="\
34 structure/
35 -----
36 structure/
37 structure/file
38 "
39
40 . $srcdir/after
This page took 0.042215 seconds and 5 git commands to generate.