diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-01-27 18:08:53 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-01-27 18:33:42 +0100 |
commit | 9170ead86561b0d494df5ac464a04d703a61e036 (patch) | |
tree | 3c5577b2933d84e298a617db43c9a6d646dfb56f | |
parent | 000cd8b2d962989e26c847a6337bc1b3a3f1c6a9 (diff) | |
download | vyos-build-9170ead86561b0d494df5ac464a04d703a61e036.tar.gz vyos-build-9170ead86561b0d494df5ac464a04d703a61e036.zip |
build-submodules: source OPAM environemnt if not present
-rwxr-xr-x | scripts/build-submodules | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/build-submodules b/scripts/build-submodules index 79abf59f..6423a14a 100755 --- a/scripts/build-submodules +++ b/scripts/build-submodules @@ -88,6 +88,15 @@ ROOTDIR="$(pwd)" PKGDIR="$ROOTDIR/packages" SCRIPTDIR="$ROOTDIR/scripts" +# Source OPAM environment if not already set +if [ -z "$OPAMROOT" ]; then + if [ -x "$(command -v opam)" ]; then + eval $(opam env --root=/opt/opam --set-root) + else + echo "WARNING: 'opam' not installed, can't build VyConf and libvyosconfig" + fi +fi + package_in_buildlist() { # Return true if buildlist is not set if [ -z "$BUILDLIST" ]; then |