From 83030b67fa9fcd63b0cf92976d28606c89969a85 Mon Sep 17 00:00:00 2001 From: Ismo Puustinen Date: Fri, 21 Dec 2018 16:06:22 +0200 Subject: [PATCH] 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. --- hack/verify-generated-files-remake.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hack/verify-generated-files-remake.sh b/hack/verify-generated-files-remake.sh index ba62242ca98..6bc1b8135ce 100755 --- a/hack/verify-generated-files-remake.sh +++ b/hack/verify-generated-files-remake.sh @@ -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