commit b70d976da5098db767509e985023c4bd1fa55ccf
parent 22995410ff96dd4ab5af134cd13f8c5671e8a743
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Mon, 30 Oct 2023 15:57:59 +0100
Upd of the escape sequence for "make test" messages
Some shells (e.g. dash) don't support the '\e' character in printf: the
escape sequence is simply ignored. So we've replaced '\e' with '\033' in
the printf used to display colored messages in "make test". This should
work as expected in all shells.
Diffstat:
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/make.sh b/make.sh
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/sh
# Copyright (C) 2018, 2020-2023 |Méso|Star> (contact@meso-star.com)
# Copyright (C) 2018 Centre National de la Recherche Scientifique
@@ -17,6 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+set -e
+
config_test()
{
for i in "$@"; do
@@ -35,9 +37,9 @@ check()
printf "%s " "${name}"
if ./"${prog}" "$@" > /dev/null 2>&1; then
- printf "\e[1;32mOK\e[m\n"
+ printf "\033[1;32mOK\033[m\n"
else
- printf "\e[1;31mError\e[m\n"
+ printf "\033[1;31mError\033[m\n"
fi 2> /dev/null
}