test02.sh revision 121798
1121798Sphk#!/bin/sh 2121798Sphk# 3121798Sphk# Copyright (c) 2003 Dan Nelson 4121798Sphk# All rights reserved. 5121798Sphk# 6121798Sphk# Please see src/share/examples/etc/bsd-style-copyright. 7121798Sphk# 8121798Sphk# $FreeBSD: head/usr.sbin/mtree/test/test02.sh 121798 2003-10-31 13:39:19Z phk $ 9121798Sphk# 10121798Sphk 11121798Sphkset -e 12121798Sphk 13121798SphkTMP=/tmp/mtree.$$ 14121798Sphk 15121798Sphkrm -rf ${TMP} 16121798Sphkmkdir -p ${TMP} ${TMP}/mr ${TMP}/mt 17121798Sphk 18121798Sphktouch -t 199901020304 ${TMP}/mr/oldfile 19121798Sphktouch ${TMP}/mt/oldfile 20121798Sphk 21121798Sphkmtree -c -p ${TMP}/mr > ${TMP}/_ 22121798Sphk 23121798Sphkmtree -U -r -p ${TMP}/mt < ${TMP}/_ > /dev/null 24121798Sphk 25121798Sphkx=x`(cd ${TMP}/mr ; ls -l 2>&1) || true` 26121798Sphky=x`(cd ${TMP}/mt ; ls -l 2>&1) || true` 27121798Sphk 28121798Sphkif [ "$x" != "$y" ] ; then 29121798Sphk echo "ERROR Update of mtime failed" 1>&2 30121798Sphk rm -rf ${TMP} 31121798Sphk exit 1 32121798Sphkfi 33121798Sphk 34121798Sphkrm -rf ${TMP} 35121798Sphkexit 0 36121798Sphk 37