diff options
author | 2011-07-20 22:49:00 +0800 | |
---|---|---|
committer | 2011-07-20 23:15:45 +0800 | |
commit | a918ae2d53a03689480738e7bfb59b91c35d14d8 (patch) | |
tree | 6cffae368a9ed93cc1d52b1bd0855989d2e5fde1 /utils | |
parent | Parser: fix delete expansion (diff) | |
download | libbash-a918ae2d53a03689480738e7bfb59b91c35d14d8.tar.gz libbash-a918ae2d53a03689480738e7bfb59b91c35d14d8.tar.bz2 libbash-a918ae2d53a03689480738e7bfb59b91c35d14d8.zip |
Parser: fix builtin/keyword test
Now more tests are uncommented or added.
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/isolated-functions.sh | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/utils/isolated-functions.sh b/utils/isolated-functions.sh index 5bb157f..9d189ed 100755 --- a/utils/isolated-functions.sh +++ b/utils/isolated-functions.sh @@ -6,21 +6,21 @@ has() { hasq $* } -#hasq() { -# for item in ${*:2} -# do -# [[ $item == $1 ]] && return 0 -# done -# return 1 -#} - -#EXPORT_FUNCTIONS() { -# if [ -z "$ECLASS" ]; then -# die "EXPORT_FUNCTIONS without a defined ECLASS" -# return 1 -# fi -# __export_funcs_var="$__export_funcs_var $*" -#} +hasq() { + for item in ${*:2} + do + [[ $item == $1 ]] && return 0 + done + return 1 +} + +EXPORT_FUNCTIONS() { + if [ -z "$ECLASS" ]; then + die "EXPORT_FUNCTIONS without a defined ECLASS" + return 1 + fi + __export_funcs_var="$__export_funcs_var $*" +} use() { echo "use shouldn't be called" |