summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Wise <pabs@debian.org>2022-02-15 15:47:39 +0800
committerPaul Wise <pabs@debian.org>2022-02-15 15:54:37 +0800
commit9f53670dc84d589d58b7689dc11b3ac08fd344e3 (patch)
tree77a49faa68ce9839af0182b3104f8cb3d71b085f
parente966da5e7f2cba74cd6c2ee382d324fec7a139ff (diff)
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`.
-rwxr-xr-xdebian/apt.bug-script8
1 files changed, 4 insertions, 4 deletions
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