diff options
-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 |