mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-06-27 10:03:08 +02:00
Merge branch 'master' of gitlab.psi.ch:Pmodules/src
This commit is contained in:
@@ -293,6 +293,8 @@ fi
|
||||
declare -x PMODULES_TMPDIR
|
||||
declare -x PMODULES_DISTFILESDIR
|
||||
|
||||
mkdir -p "${PMODULES_DISTFILESDIR}"
|
||||
|
||||
declare -r BUILD_SCRIPTSDIR="${BUILD_BASEDIR}/scripts"
|
||||
declare -r BUILD_VERSIONSFILE="${BUILD_BASEDIR}/config/versions.conf"
|
||||
|
||||
|
||||
@@ -964,6 +964,23 @@ get_available_modules() {
|
||||
echo "${mods[@]}"
|
||||
}
|
||||
|
||||
get_available_modules2() {
|
||||
local -r dir=$1
|
||||
local -r module=$2
|
||||
local -r use_releases=${3:-${UsedReleases}}
|
||||
local -a mods=()
|
||||
{
|
||||
cd "${dir}"
|
||||
while read mod; do
|
||||
local release=$( get_release "${dir}/${mod}" )
|
||||
|
||||
if [[ :${use_releases}: =~ :${release}: ]]; then
|
||||
mods+=( "${mod}" ${release} )
|
||||
fi
|
||||
done < <(find * \( -type f -o -type l \) -not -name ".*" -ipath "${module}*")
|
||||
}
|
||||
echo "${mods[@]}"
|
||||
}
|
||||
#
|
||||
# avail [-hlt] [<module-pattern>...]
|
||||
#
|
||||
@@ -1130,7 +1147,7 @@ subcommand_avail() {
|
||||
IFS=${saved_IFS}
|
||||
for string in "${pattern[@]}"; do
|
||||
for dir in "${modulepath[@]}"; do
|
||||
mods=( $( get_available_modules "${dir}" "${string}" "${opt_use_releases}" ) )
|
||||
mods=( $( get_available_modules2 "${dir}" "${string}" "${opt_use_releases}" ) )
|
||||
[[ ${#mods[@]} == 0 ]] && continue
|
||||
|
||||
${output_function}
|
||||
@@ -1648,7 +1665,7 @@ subcommand_search() {
|
||||
# get and print all available modules in $mpath
|
||||
# with respect to the requested releases
|
||||
# tmpfile: module/version release group group-dependencies...
|
||||
local mods=( $( get_available_modules \
|
||||
local mods=( $( get_available_modules2 \
|
||||
"${mpath}" \
|
||||
"${module}" \
|
||||
"${opt_use_releases}" ) )
|
||||
|
||||
@@ -13,8 +13,10 @@ declare -r BOOTSTRAP_DIR=$(std::get_abspath "${BOOTSTRAP_DIR}")
|
||||
declare -r SRC_DIR="${BOOTSTRAP_DIR}/Pmodules"
|
||||
|
||||
usage() {
|
||||
echo "build [OPTIONS] SUB-COMMAND"
|
||||
std:die 1 ""
|
||||
echo "
|
||||
build [OPTIONS] configure|compile|install
|
||||
"
|
||||
std::die 1 ""
|
||||
}
|
||||
|
||||
declare -rx DEFAULT_PMODULES_ROOT='/opt/psi'
|
||||
@@ -166,6 +168,9 @@ pmodules::install() {
|
||||
|
||||
while (( $# > 0 )); do
|
||||
case $1 in
|
||||
--debug )
|
||||
set -x
|
||||
;;
|
||||
--config )
|
||||
config_file="$2"
|
||||
shift 1
|
||||
@@ -313,7 +318,7 @@ while (( $# > 0 )); do
|
||||
shift 1
|
||||
done
|
||||
|
||||
[[ -n "${subcmd}" ]] || std::die 1 "Missing sub-command."
|
||||
[[ -n "${subcmd}" ]] || std::die 1 "Missing sub-command.\n\nUse 'build --help' to get some help..."
|
||||
|
||||
|
||||
pmodules::${subcmd} "${subcmd_args[@]}"
|
||||
|
||||
@@ -3,5 +3,5 @@ coreutils 8.23
|
||||
getopt 1.1.6
|
||||
gettext 0.19.4
|
||||
Modules 3.2.10
|
||||
Pmodules 0.99.12
|
||||
Pmodules 0.99.13
|
||||
Tcl 8.6.6
|
||||
|
||||
Reference in New Issue
Block a user