Skip to content

Commit

Permalink
Change version/id variables to match convention.
Browse files Browse the repository at this point in the history
  • Loading branch information
ulmononian committed Nov 9, 2022
1 parent 1a9fea0 commit cc9abda
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions libs/build_scotch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
set -eux

name="scotch"
version_id=${1:-${STACK_scotch_version}}
version=${1:-${STACK_scotch_version}}

# Hyphenated version used for install prefix
compiler=$(echo $HPC_COMPILER | sed 's/\//-/g')
mpi=$(echo $HPC_MPI | sed 's/\//-/g')
version=$(echo ${version_id} | sed 's/v//')
id=$(echo $version | sed 's/v//')

if $MODULES; then
set +x
Expand All @@ -21,7 +21,7 @@ if $MODULES; then
module list
set -x

prefix="${PREFIX:-"/opt/modules"}/$compiler/$mpi/$name/$version"
prefix="${PREFIX:-"/opt/modules"}/$compiler/$mpi/$name/$id"
if [[ -d $prefix ]]; then
if [[ $OVERWRITE =~ [yYtT] ]]; then
echo "WARNING: $prefix EXISTS: OVERWRITING!"
Expand All @@ -37,8 +37,8 @@ fi

cd ${HPC_STACK_ROOT}/${PKGDIR:-"pkg"}

software=$name-${version_id}
URL="https://gitlab.inria.fr/scotch/scotch/-/archive/${version_id}/scotch-${version_id}.tar.gz"
software=$name-$version
URL="https://gitlab.inria.fr/scotch/scotch/-/archive/$version/scotch-$version.tar.gz"
[[ -f $software.tar.gz ]] || ( $WGET $URL )
[[ ${DOWNLOAD_ONLY} =~ [yYtT] ]] && exit 0

Expand All @@ -58,5 +58,5 @@ make ptscotch

# generate modulefile from template
[[ -z $mpi ]] && modpath=compiler || modpath=mpi
$MODULES && update_modules $modpath $name $version
echo $name $version $URL >> ${HPC_STACK_ROOT}/hpc-stack-contents.log
$MODULES && update_modules $modpath $name $id
echo $name $id $URL >> ${HPC_STACK_ROOT}/hpc-stack-contents.log

0 comments on commit cc9abda

Please sign in to comment.