Revision 13364
Added by Aaron Marcuse-Kubitza over 10 years ago
util.sh | ||
---|---|---|
120 | 120 |
|
121 | 121 |
# usage: local prefix=..._; import_vars |
122 | 122 |
# when used inside another alias 2+ levels deep, *must* be run inside a function |
123 |
# vars already set will *not* be overwritten |
|
123 |
# idempotent: vars already set will *not* be overwritten
|
|
124 | 124 |
alias import_vars="$(cat <<'EOF' |
125 | 125 |
: "${prefix:?}" |
126 | 126 |
declare src_var dest_var |
Also available in: Unified diff
lib/sh/util.sh: import_vars: documented that it's idempotent