From: Rachita Kothiyal Date: Tue, 16 Oct 2007 05:49:04 +0000 (-0400) Subject: More cleanups to check_hierarchy X-Git-Url: https://git.fsl.cs.stonybrook.edu/?a=commitdiff_plain;h=d81ee026a5bba4f85a8021c60fcd48870a110901;p=unionfs-regression-odf.git More cleanups to check_hierarchy --- diff --git a/scaffold b/scaffold index 2164511..2f5479e 100644 --- a/scaffold +++ b/scaffold @@ -191,10 +191,20 @@ function uncramit { } function check_hierarchy { - for i in $*; do + grep -v '^$' > /tmp/expected-$$ + for i in 0 1 2 3; do + cat "/tmp/expected-$$" | grep "\/n\/lower\/b$i" >/dev/null + ret=$? + if [ $ret == 0 ]; then + browse_path="/n/lower/b$i "$browse_path + fi + done + + browse_path=$browse_path" $ODF_DIR/ns/" + for i in $browse_path; do ( - if [ "$i" == $ODF_DIR ]; then - find $i/ns/ -type f -samefile $ODF_DIR/whiteout | sed "s:$i/ns/:w $i/ns/ :g" + if [ "$i" == $ODF_DIR/ns/ ]; then + find $i -type f -samefile $ODF_DIR/whiteout | sed "s:$i:w $i :g" break fi find $i -type d -printf 'd %p\n' @@ -213,7 +223,6 @@ function check_hierarchy { sort /tmp/check-$$ > /tmp/check-$$-tmp mv /tmp/check-$$-tmp /tmp/check-$$ - grep -v '^$' > /tmp/expected-$$ while read line ; do first=`echo $line | cut -d" " -f 1` if [ "$first" == "w" ]; then