aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-02-22 08:07:55 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-02-22 08:07:55 +0200
commitf85470374ca03371d95f84eed1f9ef863eb87dcd (patch)
treed35d37fbc0052a54ef5c6516298898889d73336f
parentb6a29c14bcc527319e3d1fcba64a72129af234ec (diff)
Improve ODB regeneration script
-rwxr-xr-xbdep/odb.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/bdep/odb.sh b/bdep/odb.sh
index 4cf87c7..0f71977 100755
--- a/bdep/odb.sh
+++ b/bdep/odb.sh
@@ -7,10 +7,14 @@ inc=()
if test -d ../.bdep; then
- # Use default configuration for headers.
- #
- cfg="$(bdep config list -d .. | \
+ if [ -n "$1" ]; then
+ cfg="$1"
+ else
+ # Use default configuration for headers.
+ #
+ cfg="$(bdep config list -d .. | \
sed -r -ne 's#^(@[^ ]+ )?([^ ]+)/ .*default.*$#\2#p')"
+ fi
inc+=("-I$(echo "$cfg"/libodb-[1-9]*/)")
inc+=("-I$(echo "$cfg"/libodb-sqlite-[1-9]*/)")