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