From 17b99585b66c079560befbb17400a3a032d9efcd Mon Sep 17 00:00:00 2001 From: crouzet Date: Tue, 9 Mar 2021 16:12:31 +0100 Subject: [PATCH] sat #24027 : affichage d'un message d'avertissement pour les utilisateurs utilisant les script .sh en dehors de bash --- src/fileEnviron.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/fileEnviron.py b/src/fileEnviron.py index 6904893..3fe41c8 100644 --- a/src/fileEnviron.py +++ b/src/fileEnviron.py @@ -729,6 +729,15 @@ tcl_header="""\ bash_header="""\ #!/bin/bash +if [ "$BASH" = "" ] +then + # check that the user is not using another shell + echo + echo "Warning! SALOME environment not initialized" + echo "You must run this script in a bash shell." + echo "As you are using another shell. Please first run: bash" + echo +fi ########################################################################## # # This line is used only in case of a sat package -- 2.30.2