Pmodules/libpbuild.bash

- find_tarball() download if not locally available and SOURCE_URL is set
This commit is contained in:
2016-10-27 10:02:12 -07:00
parent c118c2eb28
commit ad5ea27f67
+10 -2
View File
@@ -217,8 +217,16 @@ find_tarball() {
done
done
done
std::error "${name}/${version}: source not found."
exit 43
if [[ -z "${SOURCE_URL}" ]]; then
std::error "${name}/${version}: source not found."
exit 43
fi
wget --directory-prefix="${PMODULES_DISTFILESDIR}" "${SOURCE_URL}"
if (( $? != 0 )); then
std::error "${name}/${version}: cannot download source."
exit 43
fi
echo "${PMODULES_DISTFILESDIR}/${SOURCE_URL##*/}"
}
###############################################################################