Revision 13982
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/bin/import_all | ||
---|---|---|
16 | 16 |
local selfDir="$(dirname -- "$self")" |
17 | 17 |
pushd "$selfDir/.." |
18 | 18 |
|
19 |
if ! test "$SHLVL" -ge 2; then # was run without subshell |
|
20 |
# needs subshell so errexits don't close the terminal window |
|
21 |
echo 'usage: must be run in a subshell, obtained by running `$0`' >&2 |
|
22 |
return 0 # not nonzero because this will close the terminal window |
|
23 |
fi |
|
19 | 24 |
if test "${BASH_LINENO[1]}" = 0; then # was run without initial "." |
20 | 25 |
echo "usage: (*in subshell*) [version=...] [inputs=(inputs/src/ ...)]; \ |
21 | 26 |
. $self [vars...] (note initial \".\")"|fold -s >&2 |
Also available in: Unified diff
bugfix: bin/import_all: ensure that this is run in a subshell, which is needed so errexits don't close the terminal window