configs: correctly terminate loop
The switch_to_toplevel() function in process_configs.sh contains a buggy loop. It tests whether $path is empty but should test whether $path equals "/". (It repeatedly calls dirname on pwd's output, and since pwd will return an absolute path this will, eventually, return "/" forever.) So let's test for "/" here. Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
This commit is contained in:
parent
f27f73697f
commit
926fa54ae1
@ -14,7 +14,7 @@ die()
|
|||||||
switch_to_toplevel()
|
switch_to_toplevel()
|
||||||
{
|
{
|
||||||
path="$(pwd)"
|
path="$(pwd)"
|
||||||
while test -n "$path"
|
while test "$path" != "/"
|
||||||
do
|
do
|
||||||
test -e $path/MAINTAINERS && \
|
test -e $path/MAINTAINERS && \
|
||||||
test -d $path/drivers && \
|
test -d $path/drivers && \
|
||||||
@ -23,7 +23,7 @@ switch_to_toplevel()
|
|||||||
path="$(dirname $path)"
|
path="$(dirname $path)"
|
||||||
done
|
done
|
||||||
|
|
||||||
test -n "$path" || die "Can't find toplevel"
|
test "$path" != "/" || die "Can't find toplevel"
|
||||||
echo "$path"
|
echo "$path"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user