diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-10-10 21:51:43 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-10-10 21:51:43 +0200 |
commit | ed7dbb9cdf0fe0459999b7efc6ac1b777ce519dd (patch) | |
tree | 29d74a2c1036c49a7812ad044efae5d2412624d5 /bin/ct | |
parent | 5036a08b042b5f311ac2f21956ac3ab133942b60 (diff) |
ct: check_prereqs: Use an anonymous function to source the prereqs file
Diffstat (limited to 'bin/ct')
-rwxr-xr-x | bin/ct | 24 |
1 files changed, 11 insertions, 13 deletions
@@ -469,18 +469,6 @@ function check_prereqs { cd $PKG_DIR/$package info "$1: checking prerequisites\n" - # function scope → typeset and localoptions are possible - function source_prereqs { - { - source prereqs - } always { - if (( TRY_BLOCK_ERROR )) { - warn "Error in prereqs script\n" - TRY_BLOCK_ERROR=0 - } - } - } - function is_installed { [[ -d $PKG_DIR/$1 ]] } @@ -521,7 +509,17 @@ function check_prereqs { } } - source_prereqs + # function scope → typeset and localoptions are possible + function { + { + source prereqs + } always { + if (( TRY_BLOCK_ERROR )) { + warn "Error in prereqs script\n" + TRY_BLOCK_ERROR=0 + } + } + } if [[ -n $warn || -n $info ]] { [[ -n $warn ]] && warn $warn |