It actually decreases readability of the .do files - by not making it explicit when you're going into a subdir. Plus it adds ambiguity: what if there's a dirname.do *and* a dirname/all? We could resolve the ambiguity if we wanted, but that adds more code, while taking out this special case makes *less* code and improves readability. I think it's the right way to go.
15 lines
292 B
Text
15 lines
292 B
Text
rm -f log dir1/log dir1/stinky
|
|
touch t1.do
|
|
. ../../flush-cache.sh
|
|
redo t1
|
|
touch t1.do
|
|
. ../../flush-cache.sh
|
|
redo t1
|
|
. ../../flush-cache.sh
|
|
redo-ifchange t1
|
|
C1="$(wc -l <dir1/log)"
|
|
C2="$(wc -l <log)"
|
|
if [ "$C1" != 1 -o "$C2" != 2 ]; then
|
|
echo "failed: t1>t1, c1=$C1, c2=$C2" >&2
|
|
exit 55
|
|
fi
|