aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-02-22 06:08:47 (GMT)
committerBoris Kolpackov <boris@codesynthesis.com>2019-02-22 06:08:47 (GMT)
commit87c6e3296002d70652d736ef31d8950cb7a0f82c (patch)
treeb7f8405ebb0980530259469c42963834bd28ad3d
parent99919c285435aee962f9de5744af57e12d730043 (diff)
Improve ODB regeneration script
-rwxr-xr-xbpkg/odb.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/bpkg/odb.sh b/bpkg/odb.sh
index 913ca6e..72753fa 100755
--- a/bpkg/odb.sh
+++ b/bpkg/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]*/)")