Remove special case for "dirname" -> "dirname/all"
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.
This commit is contained in:
parent
282bb0488e
commit
984ad747f8
13 changed files with 38 additions and 41 deletions
|
|
@ -1,2 +1,2 @@
|
|||
redo-ifchange dir1/
|
||||
redo-ifchange dir1/all
|
||||
echo $$ >>log
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
redo-ifchange dir1
|
||||
echo $$ >>log
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
redo-ifchange dir1/all
|
||||
echo $$ >>log
|
||||
|
|
@ -1,19 +1,15 @@
|
|||
touch t?.do
|
||||
for first in t1 t2 t3; do
|
||||
for second in t1 t2 t3; do
|
||||
rm -f log dir1/log dir1/stinky
|
||||
. ../../flush-cache.sh
|
||||
redo $first
|
||||
touch $second.do
|
||||
. ../../flush-cache.sh
|
||||
redo $second
|
||||
. ../../flush-cache.sh
|
||||
redo-ifchange $second
|
||||
C1="$(wc -l <dir1/log)"
|
||||
C2="$(wc -l <log)"
|
||||
if [ "$C1" != 1 -o "$C2" != 2 ]; then
|
||||
echo "failed: $first>$second, c1=$C1, c2=$C2" >&2
|
||||
exit 55
|
||||
fi
|
||||
done
|
||||
done
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue