From 81dea3420bb3286e6bfeaff951a03999ce29f437 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Wed, 30 Aug 2023 20:21:49 -0400 Subject: [PATCH 1/2] lmp: throw error if dependent packages are not installed Signed-off-by: Jinzhe Zeng --- source/lmp/Install.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/lmp/Install.sh b/source/lmp/Install.sh index d2a728226e..2bf2b0f474 100644 --- a/source/lmp/Install.sh +++ b/source/lmp/Install.sh @@ -30,6 +30,17 @@ action() { fi } +if (test $1 = 1) then + if (test ! -e ../pppm.cpp) then + echo "Must install KSPACE package with USER-DEEPMD package" + exit 1 + fi + if (test ! -e ../fix_ttm.cpp) then + echo "Must install EXTRA-FIX package with USER-DEEPMD package" + exit 1 + fi +fi + # all package files with no dependencies for file in *.cpp *.h; do From 253c0b1259eeff9556a7c51a4bd9d2bd7f8d6c9e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 19:45:32 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- source/lmp/Install.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/source/lmp/Install.sh b/source/lmp/Install.sh index 2bf2b0f474..3120a923ab 100644 --- a/source/lmp/Install.sh +++ b/source/lmp/Install.sh @@ -30,15 +30,15 @@ action() { fi } -if (test $1 = 1) then - if (test ! -e ../pppm.cpp) then - echo "Must install KSPACE package with USER-DEEPMD package" - exit 1 - fi - if (test ! -e ../fix_ttm.cpp) then - echo "Must install EXTRA-FIX package with USER-DEEPMD package" - exit 1 - fi +if (test $1 = 1); then + if (test ! -e ../pppm.cpp); then + echo "Must install KSPACE package with USER-DEEPMD package" + exit 1 + fi + if (test ! -e ../fix_ttm.cpp); then + echo "Must install EXTRA-FIX package with USER-DEEPMD package" + exit 1 + fi fi # all package files with no dependencies