Skip to content
Snippets Groups Projects
Commit adad22f8 authored by Bart Slinger's avatar Bart Slinger Committed by Lorenz Meier
Browse files

make set function work in sh

parent 4df88122
No related branches found
No related tags found
No related merge requests found
......@@ -9,9 +9,11 @@ fi
# Map the NuttX-style variable definition 'set <var> <value>' to something that
# bash and alternatives understand
set() {
# define _set first because sh does not like overwriting set directly
_set() {
eval $1=$2
}
alias set=_set
# alternative method with an alias:
# alias set='f(){ set -- "$1=$2"; eval "$1"; unset -f f; }; eval f'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment