diff options
| author | Carlos Martín Nieto <[email protected]> | 2014-08-26 23:32:27 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <[email protected]> | 2014-08-26 23:32:27 +0200 |
| commit | 84597241e0636c7b56ae88167940b029680784e8 (patch) | |
| tree | 783b5ab42f74eb2ca3416516b790d0eaa864a0d1 /script | |
| parent | 0f79d63fd51b0baf9900fecccb0a11d06b1a7bbc (diff) | |
Exit when pkg-config isn't found
We run pkg-config in a subshell, so our 'set -e' does not take effect
there. Explicitly error out if there was an error running pkg-config.
Diffstat (limited to 'script')
| -rwxr-xr-x | script/with-static.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/script/with-static.sh b/script/with-static.sh index 0caed5e..3f60e31 100755 --- a/script/with-static.sh +++ b/script/with-static.sh @@ -5,7 +5,8 @@ set -ex export BUILD="$PWD/vendor/libgit2/build" export PCFILE="$BUILD/libgit2.pc" -export CGO_LDFLAGS="$BUILD/libgit2.a -L$BUILD $(pkg-config --static --libs $PCFILE)" +FLAGS=$(pkg-config --static --libs $PCFILE) || exit 1 +export CGO_LDFLAGS="$BUILD/libgit2.a -L$BUILD ${FLAGS}" export CGO_CFLAGS="-I$PWD/vendor/libgit2/include" $@ |
