mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 18:47:21 +08:00
px4-alias.sh_in:Remove source and add R=${pwd}
px4-alias.sh_in:Remove sh alias
This commit is contained in:
committed by
Daniel Agar
parent
b846ddffd8
commit
d4ae3985b3
@@ -1,6 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# File is auto-generated by cmake compilation, do not edit.
|
# File is auto-generated by cmake compilation, do not edit.
|
||||||
|
R="`pwd`/"
|
||||||
|
|
||||||
# Map the NuttX-style variable definition 'set <var> <value>' to something that
|
# Map the NuttX-style variable definition 'set <var> <value>' to something that
|
||||||
# bash and alternatives understand
|
# bash and alternatives understand
|
||||||
@@ -9,37 +10,6 @@ _set() {
|
|||||||
eval $1=\"$2\"
|
eval $1=\"$2\"
|
||||||
}
|
}
|
||||||
alias set=_set
|
alias set=_set
|
||||||
# alternative method with an alias:
|
|
||||||
# alias set='f(){ set -- "$1=$2"; eval "$1"; unset -f f; }; eval f'
|
|
||||||
|
|
||||||
# Execute another shell script.
|
|
||||||
# $1: Path to the script, (optionally starts with /, to match with the NuttX
|
|
||||||
# scripts)
|
|
||||||
sh() {
|
|
||||||
script="$1"
|
|
||||||
case "$script" in
|
|
||||||
"/"*)
|
|
||||||
script="$script"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
script="/$script"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
. "$(pwd)$script"
|
|
||||||
}
|
|
||||||
|
|
||||||
source() {
|
|
||||||
script="$1"
|
|
||||||
case "$script" in
|
|
||||||
"/"*)
|
|
||||||
script="$script"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
script="/$script"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
. "$(pwd)$script"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Don't stop on errors.
|
# Don't stop on errors.
|
||||||
#set -e
|
#set -e
|
||||||
|
|||||||
Reference in New Issue
Block a user