add exit statement on bes.echo.error

This commit is contained in:
a-sansara 2018-12-22 00:56:23 +01:00
parent 22e86a49a8
commit 84df431633

View File

@ -94,7 +94,11 @@ function bes.echo.rs ()
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function bes.echo.error ()
{
local leave=${2:-0}
echo -e "\n${Cerr} error : ${Coff}\n\t$1 ${Coff}\n"
if [ "$leave" = "1" ]; then
exit 1;
fi
}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function bes.echo.sepline ()