aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-02-22 08:09:05 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-02-22 08:09:05 +0200
commit8054f2973d453b71806f52f0bb30725cb31d64dd (patch)
tree823809a3ac0b9716dc5d9c62e4bd996d087d678c
parent03a2d8a6aca2f38d944bd172c0baed3027773358 (diff)
Improve ODB regeneration script
-rwxr-xr-xlibbrep/odb.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/libbrep/odb.sh b/libbrep/odb.sh
index d4e6604..e2ba564 100755
--- a/libbrep/odb.sh
+++ b/libbrep/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-pgsql-[1-9]*/)")