Commit a882800a authored by gsell's avatar gsell

bugfix in pbuild::module_is_available()

parent 3e79fa68
......@@ -306,7 +306,14 @@ pbuild::module_is_avail() {
[[ -n "${uvar}" ]] || uvar="__unused__"
local output=( $("${MODULECMD}" bash avail -a -m "$1" \
2>&1 1>/dev/null) )
[[ "${output[0]}" == "$1" ]] && std::upvar "${uvar}" "${output[1]}"
local i
for (( i=0; i+=2; i < ${#output[@]})); do
if [[ "${output[0]}" == "$1" ]]; then
std::upvar "${uvar}" "${output[1]}"
return 0
fi
done
return 1
}
pbuild::set_download_url() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment