File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
channel-transport-particles/particles-mercurydpm Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ # ---- Config (you can override via env vars) ----
5+ REPO_HTTPS_DEFAULT=" https://bitbucket.org/davidscn/mercurydpm.git"
6+ REPO_URL=" ${REPO_URL:- $REPO_HTTPS_DEFAULT } " # or git@bitbucket.org:davidscn/mercurydpm.git
7+ BRANCH=" ${BRANCH:- channel-transport-tutorial} "
8+ SRC_DIR=" ${SRC_DIR:- $PWD / mercurydpm} "
9+ BUILD_DIR=" ${BUILD_DIR:- $SRC_DIR / build} "
10+
11+ # ---- Clone (if needed) and checkout branch ----
12+ if [[ ! -d " $SRC_DIR /.git" ]]; then
13+ echo " Cloning repo into: $SRC_DIR "
14+ git clone " $REPO_URL " " $SRC_DIR "
15+ else
16+ echo " Repo already exists at: $SRC_DIR "
17+ fi
18+
19+ cd " $SRC_DIR "
20+ git fetch --all --prune
21+ git checkout " $BRANCH "
22+ git pull --ff-only || true
23+
24+ # ---- Configure with CMake in build directory ----
25+ mkdir -p " $BUILD_DIR "
26+ cd " $BUILD_DIR "
27+
28+ echo " Configuring in: $BUILD_DIR "
29+ cmake -D MercuryDPM_PreCICE_COUPLING=" ON" ..
30+
31+ # ---- Build only the requested target ----
32+ echo " Building target: ChannelTransport"
33+ make -j " $( nproc) " ChannelTransport
34+
35+ export MERCURYDPM_BUILD_DIR=" $BUILD_DIR "
36+ echo " Exported MERCURYDPM_BUILD_DIR=$MERCURYDPM_BUILD_DIR "
37+ echo " Done."
38+
You can’t perform that action at this time.
0 commit comments