diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-09-27 01:59:12 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-09-27 02:10:22 +0200 |
commit | 681bd9ab8d87121c1363d9bab0ee6612623b548f (patch) | |
tree | 0936712dfc4095ece262acbf5d96f99841bef466 /coverity/coverity_all.sh | |
parent | 895deec006b85fdc15869ff32ab66ffdc0609496 (diff) |
coverity scripts: base all paths on initial $PWD
This allows having the coverity scripts in a different location than
~/coverity. In particular, this allows just cloning the osmo-ci anywhere, e.g.
having ~/osmo-ci/coverity as the build location.
Change-Id: I100cc763b06562dbeaea11c7175f3c92fc01117a
Diffstat (limited to 'coverity/coverity_all.sh')
-rwxr-xr-x | coverity/coverity_all.sh | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/coverity/coverity_all.sh b/coverity/coverity_all.sh index 8dd8d49..fd5276c 100755 --- a/coverity/coverity_all.sh +++ b/coverity/coverity_all.sh @@ -1,18 +1,22 @@ #!/usr/bin/env bash +set -e -x + base_dir="$PWD" +src_dir="$base_dir/source" +prefix="$base_dir/install" -set -e -x +install -d "$prefix" -export PATH=~/coverity/cov-analysis-linux64-8.5.0/bin/:$PATH -export PKG_CONFIG_PATH=~/coverity/install/lib/pkgconfig +export PATH="$base_dir/cov-analysis-linux64-8.5.0/bin/:$PATH" +export PKG_CONFIG_PATH="$prefix/lib/pkgconfig" do_build() { git clean -dxf git remote prune origin git pull --rebase autoreconf --install --force - ./configure --prefix=$HOME/coverity/install $* + ./configure --prefix="$prefix" $* cov-build --dir cov-int make make install @@ -71,7 +75,7 @@ upload_openbsc() { upload_osmobts() { pushd osmo-bts - do_build --enable-sysmocom-bts --with-openbsc=$PWD/../openbsc/openbsc/include + do_build --enable-sysmocom-bts --with-openbsc="$src_dir/openbsc/openbsc/include" do_upload osmo-bts popd } @@ -113,8 +117,8 @@ build_libsmpp34() { build_api() { pushd layer1-api - install -d $HOME/coverity/install/include/sysmocom/femtobts/ - cp include/*.h $HOME/coverity/install/include/sysmocom/femtobts/ + install -d "$prefix/include/sysmocom/femtobts/" + cp include/*.h "$prefix/include/sysmocom/femtobts/" popd } |