Skip to content

Commit b12f348

Browse files
committed
the action needs to fail if configure fails
1 parent 33b3901 commit b12f348

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

install-plumed.sh

+7-16
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,7 @@
22

33
# To me: the enviromental variable I am using as input are in CAPS,
44
# if I modify a variable is in lower case
5-
set -x
6-
7-
cat <<EOF
8-
REPO="$REPO"
9-
VERSION="$VERSION"
10-
SUFFIX="$SUFFIX"
11-
PREFIX="$PREFIX"
12-
EOF
5+
136
cd "$(mktemp -dt plumed.XXXXXX)" || {
147
echo "Failed to create tempdir"
158
exit 1
@@ -59,11 +52,6 @@ fi
5952
#cheking out to $version before compiling the dependency json for this $version
6053
git checkout --quiet $version
6154

62-
cat <<EOF
63-
prefix=$prefix
64-
plumed_options=$plumed_options
65-
EOF
66-
6755
if [[ -n $DEPPATH ]]; then
6856
mkdir -pv "$DEPPATH"
6957
dependencies_file="${DEPPATH}/extradeps${version}.json"
@@ -114,9 +102,12 @@ else
114102
#{var:?} makes the shell fail to avoid unwanted "explosive" deletions in /lib and /bin
115103

116104
#${LD_LIBRARY_PATH+,${LD_LIBRARY_PATH}} wil print "," then the content of LD_LIBRARY_PATH, if it is not empty
117-
set -x
118-
./configure $plumed_options ${LD_LIBRARY_PATH+LDFLAGS=-Wl,-rpath,\"${LD_LIBRARY_PATH}\"}
119-
set +x
105+
set -e
106+
(
107+
set -x
108+
./configure $plumed_options ${LD_LIBRARY_PATH+LDFLAGS=-Wl,-rpath,\"${LD_LIBRARY_PATH}\"}
109+
)
110+
120111
make -j 5
121112
make install
122113

0 commit comments

Comments
 (0)