commit 06c69cc62d020fbebb0eb2f7dbd64627a2265dd5
parent 2c5b5fbad8b6831e295c976a8f13b579710ee42d
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Tue, 31 Oct 2023 12:03:22 +0100
Update the make.sh script
Explicitly enable the -e option in the make.sh script. It was previously
defined in the shebang but was actually ignore.
Update the escape sequence in messages displayed by "make test". 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) 2022, 2023 Centre National de la Recherche Scientifique
# Copyright (C) 2022, 2023 Institut Pierre-Simon Laplace
@@ -22,6 +22,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
@@ -39,9 +41,9 @@ check()
printf "%s " "${prog}"
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
}