Skip to content
Snippets Groups Projects

Conditionally check if dune-common python package is installed

1 unresolved thread
1 file
+ 12
7
Compare changes
  • Side-by-side
  • Inline
@@ -8,11 +8,16 @@ else
exit 77
fi
# test if build directory matches installed dune python packages
python -m dune checkbuilddirs @PROJECT_NAME@ @CMAKE_BINARY_DIR@
if [ $? -eq 0 ] ; then
"$@"
else
echo "Dune python package could not be found."
exit 77
# check if dune-common python package is installed
if python -m dune --help &> /dev/null; then
# test if build directory matches installed dune python packages
python -m dune checkbuilddirs @PROJECT_NAME@ @CMAKE_BINARY_DIR@
RESULT=$?
if [ $RESULT -ne 0 ] ; then
echo "Dune python package could not check build directories"
+3
exit $RESULT
fi
fi
# execute the command
"$@"
Loading