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