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:
+2
-2
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo -e "\033[35;1mInstalling PHP 7.4 \033[0m"
|
||||
printf "\033[35;1mInstalling PHP 7.4 \033[0m\n"
|
||||
apt-get -y install lsb-release apt-transport-https ca-certificates
|
||||
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
|
||||
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list
|
||||
@@ -13,4 +13,4 @@ cp "$_assets"/php7.4-fpm.ini /etc/php/7.4/fpm/php.ini
|
||||
systemctl enable php7.4-fpm
|
||||
systemctl start php7.4-fpm
|
||||
|
||||
echo -e "\033[92;1mphp7.4-fpm installed\033[O"
|
||||
printf "\033[92;1mphp7.4-fpm installed\033[O\n"
|
||||
|
||||
Reference in New Issue
Block a user