File: run.sh.in

package info (click to toggle)
ecbuild 3.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 2,088 kB
  • sloc: sh: 683; perl: 593; cpp: 399; python: 383; f90: 317; ansic: 163; fortran: 43; makefile: 10
file content (32 lines) | stat: -rwxr-xr-x 667 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash

set -e

HERE="$( cd $( dirname "${BASH_SOURCE[0]}" ) && pwd -P )"

ECBUILD_PATH=@CMAKE_SOURCE_DIR@/bin
SRC_DIR=@CMAKE_CURRENT_SOURCE_DIR@/proj

# Add ecbuild to path
export PATH=$ECBUILD_PATH:$PATH

cd $HERE

# ---------------------- cleanup -----------------------
rm -rf build build2

# ----------------------- build ------------------------
mkdir build
cd build
ecbuild -- $SRC_DIR
make

# ---------------------- relocate ----------------------
cd $HERE
mv build build2

# ------------------------ run -------------------------
build2/bin/myexe >myexe.out

# -------------------- check output --------------------
grep -q "^Hello!$" myexe.out