blob: 365dde34202f8dd5eff996f1ea7d7f6d0b471810 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#!/bin/sh
#
# Copyright (c) 2003 Dan Nelson
# All rights reserved.
#
# Please see src/share/examples/etc/bsd-style-copyright.
#
# $FreeBSD: src/usr.sbin/mtree/test/test02.sh,v 1.1.30.1 2009/04/15 03:14:26 kensmith Exp $
#
set -e
TMP=/tmp/mtree.$$
rm -rf ${TMP}
mkdir -p ${TMP} ${TMP}/mr ${TMP}/mt
touch -t 199901020304 ${TMP}/mr/oldfile
touch ${TMP}/mt/oldfile
mtree -c -p ${TMP}/mr > ${TMP}/_
mtree -U -r -p ${TMP}/mt < ${TMP}/_ > /dev/null
x=x`(cd ${TMP}/mr ; ls -l 2>&1) || true`
y=x`(cd ${TMP}/mt ; ls -l 2>&1) || true`
if [ "$x" != "$y" ] ; then
echo "ERROR Update of mtime failed" 1>&2
rm -rf ${TMP}
exit 1
fi
rm -rf ${TMP}
exit 0
|