gen_build_files.sh uses bashism, document it
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
b367bb2a62
commit
084e2284c7
@ -1,4 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
# bashism:
|
||||||
|
# "read -r" without variable name reads line into $REPLY
|
||||||
|
# without stripping whitespace.
|
||||||
|
|
||||||
test $# -ge 2 || { echo "Syntax: $0 SRCTREE OBJTREE"; exit 1; }
|
test $# -ge 2 || { echo "Syntax: $0 SRCTREE OBJTREE"; exit 1; }
|
||||||
|
|
||||||
@ -7,9 +10,7 @@ cd -- "$2" || { echo "Syntax: $0 SRCTREE OBJTREE"; exit 1; }
|
|||||||
|
|
||||||
srctree="$1"
|
srctree="$1"
|
||||||
|
|
||||||
find -type d | while read -r; do
|
find -type d | while read -r d; do
|
||||||
d="$REPLY"
|
|
||||||
|
|
||||||
src="$srctree/$d/Kbuild.src"
|
src="$srctree/$d/Kbuild.src"
|
||||||
dst="$d/Kbuild"
|
dst="$d/Kbuild"
|
||||||
if test -f "$src"; then
|
if test -f "$src"; then
|
||||||
@ -49,7 +50,6 @@ find -type d | while read -r; do
|
|||||||
mv -- "$dst.$$.tmp" "$dst"
|
mv -- "$dst.$$.tmp" "$dst"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# Last read failed. This is normal. Don't exit with its error code:
|
# Last read failed. This is normal. Don't exit with its error code:
|
||||||
|
Loading…
Reference in New Issue
Block a user