module loader: fix "after" dependency type
This commit is contained in:
parent
fe1a5290fe
commit
06c218dbb5
|
@ -43,10 +43,12 @@ mod_queue() {
|
||||||
local module="$1"
|
local module="$1"
|
||||||
local modsource="$ZMODPATH/$module"
|
local modsource="$ZMODPATH/$module"
|
||||||
|
|
||||||
|
if ! mod_exists "$module" ; then
|
||||||
if [[ "$2" == "is_dep" ]]; then
|
if [[ "$2" == "is_dep" ]]; then
|
||||||
if ! [ -e "$modsource" ] ; then
|
|
||||||
echo "$3: Unsatisfied dependency \"$module\"";
|
echo "$3: Unsatisfied dependency \"$module\"";
|
||||||
return 1
|
return 1
|
||||||
|
else
|
||||||
|
return 2
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -62,6 +64,10 @@ mod_queue() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mod_exists() {
|
||||||
|
[ -e "$ZMODPATH/$module" ]
|
||||||
|
}
|
||||||
|
|
||||||
# Checks for module dependencies
|
# Checks for module dependencies
|
||||||
#
|
#
|
||||||
# Reads the "depend" file for a module and tries to queue all dependencies for
|
# Reads the "depend" file for a module and tries to queue all dependencies for
|
||||||
|
@ -107,7 +113,7 @@ mod_check_dep() {
|
||||||
if ([ -z "$ZMODLOAD_ONLY" ] \
|
if ([ -z "$ZMODLOAD_ONLY" ] \
|
||||||
|| in_array "$dep" "${(@)ZMODLOAD_ONLY}") \
|
|| in_array "$dep" "${(@)ZMODLOAD_ONLY}") \
|
||||||
&& ! in_array "$dep" "${(@)ZMODLOAD_BLACKLIST}"; then
|
&& ! in_array "$dep" "${(@)ZMODLOAD_BLACKLIST}"; then
|
||||||
mod_queue "$dep" is_dep ${modpath};
|
mod_queue "$dep"
|
||||||
fi ;;
|
fi ;;
|
||||||
"block")
|
"block")
|
||||||
if in_array "$dep" "${(@)ZMODLOAD_ONLY}" \
|
if in_array "$dep" "${(@)ZMODLOAD_ONLY}" \
|
||||||
|
|
Loading…
Reference in a new issue