From 9f53670dc84d589d58b7689dc11b3ac08fd344e3 Mon Sep 17 00:00:00 2001 From: Paul Wise Date: Tue, 15 Feb 2022 15:47:39 +0800 Subject: bugscript: switch from `echo -e` to printf Otherwise slashes in filenames could be interpreted as newlines etc. Also makes it portable to shells that don't support `echo -e`. --- debian/apt.bug-script | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'debian/apt.bug-script') diff --git a/debian/apt.bug-script b/debian/apt.bug-script index 1e895fb1f..c322b723b 100755 --- a/debian/apt.bug-script +++ b/debian/apt.bug-script @@ -10,7 +10,7 @@ EOF yesno "May I include your apt configuration (/etc/apt/apt.conf et al)? [Y/n] " yep if [ "$REPLY" = "yep" ]; then - echo -e "\n-- apt-config dump --\n" >&3 + printf "\n-- apt-config dump --\n\n" >&3 apt-config dump >&3 2>&1 fi @@ -18,12 +18,12 @@ for config in /etc/apt/preferences /etc/apt/preferences.d/* /etc/apt/sources.lis if [ -f "$config" ]; then yesno "May I include your $config configuration file? [Y/n] " yep if [ "$REPLY" = "yep" ]; then - echo -e "\n-- $config --\n" >&3 + printf "\n-- %s --\n\n" "$config" >&3 cat "$config" >&3 else - echo -e "\n-- ($config present, but not submitted) --\n" >&3 + printf "\n-- (%s present, but not submitted) --\n\n" "$config" >&3 fi else - echo -e "\n-- (no $config present) --\n" >&3 + printf "\n-- (no %s present) --\n\n" "$config" >&3 fi done -- cgit v1.2.3-70-g09d2