[LEDE-DEV] [PATCH v3 13/13] scripts: read without -r will mangle backslashes
Jan-Tarek Butt
tarek at ring0.de
Thu Oct 6 01:50:40 PDT 2016
Signed-off-by: Jan-Tarek Butt <tarek at ring0.de>
---
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 2de3c51..0940732 100755
--- a/scripts/clean-package.sh
+++ b/scripts/clean-package.sh
@@ -10,14 +10,14 @@ set -e
}
cat "$1" | (
cd "$2"
- while read entry; do
+ while read -r entry; do
[ -n "$entry" ] || break
[ -f "$entry" ] && rm -f "$entry"
done
)
cat "$1" | (
cd "$2"
- 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