Replace echo -e with printf for portable ANSI banners
dash (Debian's /bin/sh) doesn't support echo's -e flag: it prints "-e" literally as text before processing the rest of the string's backslash escapes. Every script's colored banner was affected. printf's escape handling is POSIX-mandated and behaves identically under dash and bash, so swap all 90 echo -e calls for printf, appending the trailing \n that echo used to add implicitly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+4
-4
@@ -1,13 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo -e '\033[35m
|
||||
printf '\033[35m
|
||||
___ __ __ __ __ __
|
||||
/ | __ __/ /_____ / / / /___ ____/ /___ _/ /____
|
||||
/ /| |/ / / / __/ __ \ / / / / __ \/ __ / __ `/ __/ _ \
|
||||
/ ___ / /_/ / /_/ /_/ / / /_/ / /_/ / /_/ / /_/ / /_/ __/
|
||||
/_/ |_\__,_/\__/\____/ \____/ .___/\__,_/\__,_/\__/\___/
|
||||
/_/
|
||||
\033[0m'
|
||||
\033[0m\n'
|
||||
# https://www.howtoforge.com/how-to-configure-automatic-updates-on-debian-wheezy
|
||||
# https://www.bisolweb.com/tutoriels/serveur-vps-ovh-partie-5-installation-apticron/
|
||||
|
||||
@@ -16,7 +16,7 @@ if [ "$(id -u)" -ne 0 ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
echo -e "\033[35;1mInstalling apticron \033[0m"
|
||||
printf "\033[35;1mInstalling apticron \033[0m\n"
|
||||
apt-get --yes install apticron
|
||||
|
||||
sleep 3
|
||||
@@ -27,4 +27,4 @@ sed -i -r "s/EMAIL=\"root\"/EMAIL=\"$email\"/g" /etc/apticron/apticron.conf
|
||||
# sed -i -r "s/# DIFF_ONLY=\"1\"/DIFF_ONLY=\"1\"/g" /etc/apticron/apticron.conf
|
||||
sed -i -r "s/# NOTIFY_NEW=\"0\"/NOTIFY_NEW=\"0\"/g" /etc/apticron/apticron.conf
|
||||
|
||||
echo -e "\033[92;1mApticron installed and configured\033[0m"
|
||||
printf "\033[92;1mApticron installed and configured\033[0m\n"
|
||||
|
||||
Reference in New Issue
Block a user