Pmodules/libpbuild.bash: fixes in get_source(), modulefile installation can be forced via command-line

This commit is contained in:
2018-04-13 16:31:53 +02:00
parent 2ab75e7636
commit f06f300598
+9 -4
View File
@@ -189,8 +189,11 @@ pbuild::get_source() {
local -r url="$2"
shift 2
dirs+=( "$@" )
local -r fname="$P-$V.${url##*.}"
local -r fname_in_url="${url##*/}"
local -r extension=$(echo ${fname_in_url} | sed 's/.*\(.tar.bz2\|.tbz2\|tar.gz\|.tgz\|.tar.xz\|.zip\)/\1/')
local -r fname="$P-$V.${extension}"
echo "fname=\"${fname}\""
local dir=''
dirs+=( 'not found' )
for dir in "${dirs[@]}"; do
@@ -876,8 +879,6 @@ pbuild::make_all() {
fi
[[ "${target}" == "install" ]] && return 0
install_modulefile
[[ ${enable_cleanup_build} == yes ]] && pbuild::cleanup_build
[[ ${enable_cleanup_src} == yes ]] && pbuild::cleanup_src
return 0
@@ -896,8 +897,12 @@ pbuild::make_all() {
[[ "${force_rebuild}" == 'yes' ]] || \
[[ -n "${target}" ]]; then
build_module
install_modulefile
else
std::info "${P}/${V}: already exists, not rebuilding ..."
if [[ "${opt_install_modulefile}" == "yes" ]]; then
install_modulefile
fi
fi
set_module_release
else