Commit a6ab5f03 authored by gsell's avatar gsell

bugfix in pbuild::module_is_available()

parent a882800a
......@@ -307,9 +307,9 @@ pbuild::module_is_avail() {
local output=( $("${MODULECMD}" bash avail -a -m "$1" \
2>&1 1>/dev/null) )
local i
for (( i=0; i+=2; i < ${#output[@]})); do
if [[ "${output[0]}" == "$1" ]]; then
std::upvar "${uvar}" "${output[1]}"
for (( i = 0; i < ${#output[@]}; i += 2 )); do
if [[ "${output[$i]}" == "$1" ]]; then
std::upvar "${uvar}" "${output[i+1]}"
return 0
fi
done
......
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