Skip to main content
1 of 2

You may override exit in your main.sh by declaring a custom exit function at the beginning of main.sh.

#!/bin/bash
# main.sh
exit() { 
   local exit_code="$?"
   test "$exit_code" -ne 0 && builtin exit "$exit_code"
   :
}
clear;
source /opt/external-svn/config.sh;
echo "$var1 and $var2 and $var3";

#unset -f exit; exit 0
builtin exit 0