NuttX-Posix least bad LGD

Nuttx now supports sh and source (.)
   sh will open a new process for each invocation.
   This means the child can not modify the parent
   env. So we must use . to matain how nuttx worked.

   Since rc.vehicle_setup is used in both we use
   source and alis as we did with sh.
This commit is contained in:
David Sidrane
2020-08-20 09:25:48 -07:00
committed by Daniel Agar
parent 323dd389fe
commit 6e1078c96e
2 changed files with 25 additions and 12 deletions
@@ -28,6 +28,19 @@ sh() {
. "$(pwd)$script"
}
source() {
script="$1"
case "$script" in
"/"*)
script="$script"
;;
*)
script="/$script"
;;
esac
. "$(pwd)$script"
}
# Don't stop on errors.
#set -e