More cleanups to check_hierarchy
authorRachita Kothiyal <rachita@dewey.fsl.cs.sunysb.edu>
Tue, 16 Oct 2007 05:49:04 +0000 (01:49 -0400)
committerRachita Kothiyal <rachita@dewey.fsl.cs.sunysb.edu>
Tue, 16 Oct 2007 05:49:04 +0000 (01:49 -0400)
scaffold

index 21645119212287c380891468c89d364ac694bf94..2f5479e5ea520c0478cde45e13971fee96a8492d 100644 (file)
--- 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