[OpenWrt-Devel,4/4] scripts/env: use read -r instead of read
diff mbox series

Message ID 20200106023238.170677-4-rosenp@gmail.com
State New
Headers show
Series
  • [OpenWrt-Devel,1/4] scripts/env: use command -v instead of which
Related show

Commit Message

Rosen Penev Jan. 6, 2020, 2:32 a.m. UTC
read mangles backslashes.

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 scripts/env | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/scripts/env b/scripts/env
index 848850a778..c81fbf8ddc 100755
--- a/scripts/env
+++ b/scripts/env
@@ -42,7 +42,7 @@  ask_bool() {
 		local VAL
 
 		echo -n "$* ($defstr): "
-		read VAL
+		read -r VAL
 		case "$VAL" in
 			y*|Y*) val=0;;
 			n*|N*) val=1;;