}
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'
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