verify-generated-files-remake.sh: use 'read -r'.

'read' will not handle backslashes properly. 'read -r' is safer to use.
The find_genfiles() will not insert backslashes, so if there are any,
they will be from directory names.
pull/564/head
Ismo Puustinen 2018-12-21 16:06:22 +02:00
parent a911034e01
commit 83030b67fa
1 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ function find_genfiles() {
# $1 = filename pattern as in "zz_generated.$1.go"
# $2 timestamp file
function newer() {
find_genfiles "$1" | while read F; do
find_genfiles "$1" | while read -r F; do
if [[ "${F}" -nt "$2" ]]; then
echo "${F}"
fi
@ -47,7 +47,7 @@ function newer() {
# $1 = filename pattern as in "zz_generated.$1.go"
# $2 timestamp file
function older() {
find_genfiles "$1" | while read F; do
find_genfiles "$1" | while read -r F; do
if [[ "$2" -nt "${F}" ]]; then
echo "${F}"
fi