Revision 14034
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/bin/with_all | ||
---|---|---|
3 | 3 |
# Creates a job in the calling shell for each process. |
4 | 4 |
# Must be run from the root svn directory. |
5 | 5 |
|
6 |
isset() { declare -p "$1" &>-; } # "${var+isset}" doesn't work for empty arrays |
|
7 |
|
|
6 | 8 |
main() |
7 | 9 |
{ |
8 | 10 |
local self="${BASH_SOURCE[0]}" |
... | ... | |
14 | 16 |
make_target [vars...] (note initial \".\")"|fold -s >&2 |
15 | 17 |
return 2 |
16 | 18 |
fi |
17 |
if test ! "${inputs+isset}"; then local inputs=(inputs/*/); fi |
|
19 |
declare -p inputs |
|
20 |
if ! isset inputs; then local inputs=(inputs/*/); fi |
|
21 |
declare -p inputs |
|
18 | 22 |
if test "$hidden_srcs"; then local inputs=(inputs/.[^as.]*/ "${inputs[@]}") |
19 | 23 |
fi # not . .. .svn .archive |
20 | 24 |
|
Also available in: Unified diff
bugfix: bin/with_all: testing if @inputs is set: `"${inputs+isset}"` syntax doesn't work for empty arrays, so need to use `declare -p` instead