merge conflicts resolved

This commit is contained in:
2018-07-11 10:23:11 +02:00
8 changed files with 47 additions and 60 deletions
+1
View File
@@ -1,4 +1,5 @@
environment.bash
modbuild.conf
modulecmd.bash
modulecmd.tcl
modmanage.bash
+19 -14
View File
@@ -191,6 +191,9 @@ pbuild::use_cc() {
# If the source URL is given, we look for the file-name specified in
# the URL. Otherwise we test for several possible names/extensions.
#
# The downloaded file will be stored with the name "$P-$V" and extension
# derived from URL. The download directory is the first directory passed.
#
# Arguments:
# $1: store file name with upvar here
# $2: download URL
@@ -205,26 +208,28 @@ download_source_file() {
local -r url="$2"
shift 2
dirs+=( "$@" )
fname="${url##*/}"
local -r fname="${url##*/}"
local -r extension=$(echo ${fname} | sed 's/.*\(.tar.bz2\|.tbz2\|.tar.gz\|.tgz\|.tar.xz\|.zip\)/\1/')
echo "fname=\"${fname}\""
local dir=''
dirs+=( 'not found' )
for dir in "${dirs[@]}"; do
[[ -r "${dir}/${fname}" ]] && break
done
local output_fname
if [[ "${dir}" == 'not found' ]]; then
local -r output_fname="${dirs[0]}/${fname}"
dir="${dirs[0]}"
local -r method="${url%:*}"
case "${method}" in
http | https | ftp )
curl \
-L \
--output "${output_fname}" \
--output "${dir}/${fname}" \
"${url}"
if (( $? != 0 )); then
curl \
--insecure \
--output "${output_fname}" \
--output "${dir}/${fname}" \
"${url}"
fi
;;
@@ -232,11 +237,9 @@ download_source_file() {
std::die 4 "Error in download URL: unknown download method '${method}'!"
;;
esac
else
output_fname="${dir}/${fname}"
fi
std::upvar "${var}" "${output_fname}"
[[ -r "${output_fname}" ]]
std::upvar "${var}" "${dir}/${fname}"
[[ -r "${dir}/${fname}" ]]
}
pbuild::pre_prep() {
@@ -789,7 +792,7 @@ pbuild::make_all() {
local dst="${PMODULES_ROOT}/"
dst+="${ModuleGroup}/"
dst+="${PMODULES_MODULEFILES_DIR}/"
dst+="${ModuleName}" # = name/version
dst+="${ModuleName}" # = group hierarchy + name/version
# directory where to install modulefile
local -r dstdir=${dst%/*}
@@ -806,7 +809,7 @@ pbuild::make_all() {
local target_dir="${PMODULES_ROOT}/"
target_dir+="${ModuleGroup}/"
target_dir+="${PMODULES_MODULEFILES_DIR}/"
target_dir+="${P}"
target_dir+="${ModuleName%/*}" # = group hierarchy + name
mkdir -p "${target_dir}"
std::info "${P}/${V}: setting release to '${ModuleRelease}' ..."
@@ -893,8 +896,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
@@ -913,8 +914,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
+4
View File
@@ -149,6 +149,7 @@ declare enable_cleanup_src='no'
declare target=''
declare bootstrap='no'
declare variants_file=''
declare opt_install_modulefile=''
# array collecting all modules specified on the command line via '--with=module'
with_modules=()
@@ -249,6 +250,9 @@ while (( $# > 0 )); do
--bootstrap )
bootstrap='yes'
;;
--install-modulefile )
opt_install_modulefile='yes'
;;
[0-9]* )
V=$1
;;
+19 -8
View File
@@ -1,5 +1,24 @@
#!/bin/bash
#
# The following settings are system defaults. They can be (re-)defined
# in a system wide profile or in a user's profile.
# set groups which should be available after initialization
: ${PMODULES_DEFAULT_GROUPS:='Tools Programming'}
# set releases which should be available after initialization
: ${PMODULES_DEFAULT_RELEASES:='stable'}
# set default version
: ${PMODULES_VERSION:=@PMODULES_VERSION@}
export PMODULES_DEFAULT_GROUPS
export PMODULES_DEFAULT_RELEASES
export PMODULES_VERSION
#############################################################################
# N O C H A N G E S B E L O W T H I S L I N E ! #
#
# Notes:
# - PMODULES_ROOT is derived from the location of this file.
# - Some for PMODULES_CONFIG_DIR.
@@ -7,14 +26,6 @@
# ${PMODULES_ROOT}/Tools/Pmodules/${PMODULES_VERSION}
#
: ${PMODULES_DEFAULT_GROUPS:='Tools Programming'}
: ${PMODULES_DEFAULT_RELEASES:='stable'}
: ${PMODULES_VERSION:=@PMODULES_VERSION@}
#############################################################################
# N O C H A N G E S B E L O W T H I S L I N E ! #
#############################################################################
export PMODULES_DEFAULT_GROUPS
export PMODULES_DEFAULT_RELEASES
export PMODULES_VERSION
+1 -1
View File
@@ -155,7 +155,7 @@ pmodules::compile() {
fi
if [[ ! -e "${PMODULES_HOME}/libexec/modulecmd.bin" ]] || [[ ${force} == 'yes' ]]; then
build Modules "${MODULES_VERSION}"
build modules "${MODULES_VERSION}"
fi
echo "Done..."
}
-34
View File
@@ -1,34 +0,0 @@
#!/bin/bash
#
# define PMODULES_ROOT only if it has not been passed as argument
# to build/install scripts
#
declare -x PMODULES_ROOT
declare -x PMODULES_DISTFILESDIR
declare -x PMODULES_TMPDIR
: ${PMODULES_ROOT:=/opt/psi}
: ${PMODULES_DISTFILESDIR:=/opt/psi/var/distfiles}
: ${PMODULES_TMPDIR:=/var/tmp/${USER}}
declare -x PMODULES_CONFIG_DIR='config'
declare -x PMODULES_MODULEFILES_DIR='modulefiles'
declare -x PMODULES_HOME="${PMODULES_ROOT}/Tools/Pmodules/${PMODULES_VERSION}"
declare -x PMODULES_DEFAULT_GROUPS='Tools Programming'
declare -x PMODULES_DEFINED_RELEASES=':unstable:stable:deprecated:'
declare -x PMODULES_DEFAULT_RELEASES='stable'
#-----------------------------------------------------------------------------
# OS specific configuration
#
case ${OS} in
Darwin )
declare -x MACOSX_DEPLOYMENT_TARGET='10.12'
#declare -rx SDKROOT='macosx10.9'
;;
esac
+2 -2
View File
@@ -17,8 +17,8 @@ declare -x PMODULES_DEFAULT_GROUPS='Tools Programming'
declare -x PMODULES_DEFINED_RELEASES=':unstable:stable:deprecated:'
declare -x PMODULES_DEFAULT_RELEASES='stable'
declare -x PMODULES_DISTFILESDIR
declare -x PMODULES_TMPDIR
export PMODULES_DISTFILESDIR
export PMODULES_TMPDIR
#-----------------------------------------------------------------------------
# OS specific configuration
+1 -1
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env modbuild
SOURCE_URL="https://netix.dl.sourceforge.net/project/modules/Modules/modules-$V/modules-$V.tar.bz2"
SOURCE_URL="https://amas.web.psi.ch/Downloads/$P/$P-$V.tar.bz2"
TCL_DIR="${PMODULES_ROOT}/Tools/Pmodules/${PMODULES_VERSION}"