[LEDE-DEV] [patch master 15/15] read without -r will mangle backslashes

Jan-Tarek Butt tarek at ring0.de
Fri Sep 30 13:02:29 PDT 2016


---
 scripts/clean-package.sh | 4 ++--
 scripts/rstrip.sh        | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/clean-package.sh b/scripts/clean-package.sh
index 9efcac5..061a3c3 100755
--- a/scripts/clean-package.sh
+++ b/scripts/clean-package.sh
@@ -9,14 +9,14 @@
 }
 cat "$1" | (
 	cd "$2" || exit
-	while read entry; do
+	while read -r entry; do
 		[ -n "$entry" ] || break
 		[ -f "$entry" ] && rm -f "$entry"
 	done
 )
 cat "$1" | (
 	cd "$2" || exit
-	while read entry; do
+	while read -r entry; do
 		[ -n "$entry" ] || break
 		[ -d "$entry" ] && rmdir "$entry" > /dev/null 2>&1
 	done
diff --git a/scripts/rstrip.sh b/scripts/rstrip.sh
index 57c76c0..ddc8038 100755
--- a/scripts/rstrip.sh
+++ b/scripts/rstrip.sh
@@ -24,7 +24,7 @@ find "$TARGETS" -type f -a -exec file {} \; | \
   sed -n -e 's/^\(.*\):.*ELF.*\(executable\|relocatable\|shared object\).*,.* stripped/\1:\2/p' | \
 (
   IFS=":"
-  while read F S; do
+  while read -r F S; do
     echo "$SELF: $F: $S"
 	[ "${S}" = "relocatable" ] && {
 		eval "$STRIP_KMOD $F"
-- 
2.10.0




More information about the Lede-dev mailing list