I have several kinds of buildA.sh, buildB.sh, ... scripts which compile some codes. I also have a general script common.sh which do pre-process, set environments and set trap command.
cat common.sh
~~~
./buildA.sh #call build.sh, other build.sh run in other directory.
~~~
I need to make build.sh run as subshell from common.sh to re-use trap command and non-export variable access to common.sh Is there any way to do that or workaround?