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# 9 10set -e 11 12TMP=/tmp/mtree.$$ 13 14rm -rf ${TMP} 15mkdir -p ${TMP} ${TMP}/mr ${TMP}/mt 16 17touch -t 199901020304 ${TMP}/mr/oldfile 18touch ${TMP}/mt/oldfile 19 20mtree -c -p ${TMP}/mr > ${TMP}/_ 21 22mtree -U -r -p ${TMP}/mt < ${TMP}/_ > /dev/null 23 24x=x`(cd ${TMP}/mr ; ls -l 2>&1) || true` 25y=x`(cd ${TMP}/mt ; ls -l 2>&1) || true` 26 27if [ "$x" != "$y" ] ; then 28 echo "ERROR Update of mtime failed" 1>&2 29 rm -rf ${TMP} 30 exit 1 31fi 32 33rm -rf ${TMP} 34exit 0 35 36