Project

General

Profile

« Previous | Next » 

Revision 14034

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

View differences:

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