bugfix(webi): printf rather than echo -e for colors for certain shells
authorAJ ONeal <aj@therootcompany.com>
Sun, 14 Nov 2021 20:56:28 +0000 (20:56 +0000)
committerAJ ONeal <aj@therootcompany.com>
Sun, 14 Nov 2021 20:56:28 +0000 (20:56 +0000)
_webi/bootstrap.sh
_webi/template.sh

index 7d6ddb5a4ac604a3b2b4a1e6362cac6277716871..e0a10eb3ad8ef87d6282fcbf7a46998af0b05ef6 100644 (file)
@@ -9,13 +9,14 @@ function __install_webi() {
     export WEBI_HOST
 
     echo ""
-    echo -e "Thanks for using webi to install '\e[32m${WEBI_PKG:-}\e[0m' on '\e[31m$(uname -s)/$(uname -m)\e[0m'."
+    printf "Thanks for using webi to install '\e[32m${WEBI_PKG:-}\e[0m' on '\e[31m$(uname -s)/$(uname -m)\e[0m'.\n"
     echo "Have a problem? Experience a bug? Please let us know:"
     echo "        https://github.com/webinstall/webi-installers/issues"
     echo ""
-    echo -e "\e[31mLovin'\e[0m it? Say thanks with a \e[34mStar on GitHub\e[0m:"
-    echo -e "        \e[32mhttps://github.com/webinstall/webi-installers\e[0m"
+    printf "\e[31mLovin'\e[0m it? Say thanks with a \e[34mStar on GitHub\e[0m:\n"
+    printf "        \e[32mhttps://github.com/webinstall/webi-installers\e[0m\n"
     echo ""
+
     WEBI_WELCOME=true
     export WEBI_WELCOME
 
index 170e08049bbe64bdc461081012c1857de511ca7c..01a9e3a4cec6e06f8debbaaf4001b34bbfa3d85a 100644 (file)
@@ -305,12 +305,12 @@ function __bootstrap_webi() {
 
     if [[ -z ${WEBI_WELCOME:-} ]]; then
         echo ""
-        echo -e "Thanks for using webi to install '\e[32m${WEBI_PKG:-}\e[0m' on '\e[31m$(uname -s)/$(uname -m)\e[0m'."
+        printf "Thanks for using webi to install '\e[32m${WEBI_PKG:-}\e[0m' on '\e[31m$(uname -s)/$(uname -m)\e[0m'.\n"
         echo "Have a problem? Experience a bug? Please let us know:"
         echo "        https://github.com/webinstall/webi-installers/issues"
         echo ""
-        echo -e "\e[31mLovin'\e[0m it? Say thanks with a \e[34mStar on GitHub\e[0m:"
-        echo -e "        \e[32mhttps://github.com/webinstall/webi-installers\e[0m"
+        printf "\e[31mLovin'\e[0m it? Say thanks with a \e[34mStar on GitHub\e[0m:\n"
+        printf "        \e[32mhttps://github.com/webinstall/webi-installers\e[0m\n"
         echo ""
     fi