From 9ca46971f2f85005d5c8e7d11493a4ad46221f7d Mon Sep 17 00:00:00 2001 From: Ondrej Kozina Date: Tue, 14 Nov 2023 14:45:44 +0100 Subject: [PATCH] Fix systemd-test-plugin initialization. check for .git subdirectory to decide if systemd repository needs to be cloned. --- tests/systemd-test-plugin | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/systemd-test-plugin b/tests/systemd-test-plugin index 4c64464f4..c972f8b97 100755 --- a/tests/systemd-test-plugin +++ b/tests/systemd-test-plugin @@ -85,7 +85,7 @@ CRYPTENROLL_LD_PRELOAD="" SYSTEMD_CRYPTENROLL=$SYSTEMD_PATH/build/systemd-cryptenroll mkdir -p $SYSTEMD_PATH - [ -e $SYSTEMD_PATH ] || git clone --depth=1 https://github.com/systemd/systemd.git $SYSTEMD_PATH + [ -d $SYSTEMD_PATH/.git ] || git clone --depth=1 https://github.com/systemd/systemd.git $SYSTEMD_PATH cd $SYSTEMD_PATH meson -D tpm2=true -D libcryptsetup=true -D libcryptsetup-plugins=true build/ || skip "Failed to configure systemd via meson, some dependencies are probably missing." ninja -C build/ systemd-cryptenroll libcryptsetup-token-systemd-tpm2.so || skip "Failed to build systemd." @@ -123,7 +123,7 @@ CRYPTENROLL_LD_PRELOAD="" SYSTEMD_CRYPTENROLL=$SYSTEMD_PATH/build/systemd-cryptenroll mkdir -p $SYSTEMD_PATH - [ -e $SYSTEMD_PATH ] || git clone --depth=1 https://github.com/systemd/systemd.git $SYSTEMD_PATH + [ -d $SYSTEMD_PATH/.git ] || git clone --depth=1 https://github.com/systemd/systemd.git $SYSTEMD_PATH cd $SYSTEMD_PATH meson -D tpm2=true -D libcryptsetup=true -D libcryptsetup-plugins=true build/ || skip "Failed to configure systemd via meson, some dependencies are probably missing." ninja -C build/ systemd-cryptenroll libcryptsetup-token-systemd-tpm2.so || skip "Failed to build systemd."