mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 18:56:58 +08:00
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:
committed by
Daniel Agar
parent
323dd389fe
commit
6e1078c96e
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user