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,14 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo -e '\033[35m
|
||||
printf '\033[35m
|
||||
____ __ _______ __
|
||||
/ __ \____ / /_ / ____(_) /__ _____
|
||||
/ / / / __ \/ __/ / /_ / / / _ \/ ___/
|
||||
/ /_/ / /_/ / /_ / __/ / / / __(__ )
|
||||
/_____/\____/\__/ /_/ /_/_/\___/____/
|
||||
\033[0m'
|
||||
\033[0m\n'
|
||||
#installing better prompt and some goodies
|
||||
echo -e "\033[35;1mInstalling shell prompt for current user $USER \033[0m"
|
||||
printf "\033[35;1mInstalling shell prompt for current user $USER \033[0m\n"
|
||||
sleep 2
|
||||
# get the current position
|
||||
_cwd="$(pwd)"
|
||||
@@ -19,4 +19,4 @@ git clone https://figureslibres.io/gitea/bachir/dotfiles-server.git ~/.dotfiles-
|
||||
source ~/.bashrc
|
||||
# return to working directory
|
||||
cd "$_cwd"
|
||||
echo -e "\033[92;1mDot files installed for $USER\033[0m"
|
||||
printf "\033[92;1mDot files installed for $USER\033[0m\n"
|
||||
|
||||
Reference in New Issue
Block a user