From 119d0f14439956f3aa71ad3a1df5f3e1cda5fab5 Mon Sep 17 00:00:00 2001 From: Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> Date: Sat, 7 Oct 2023 21:01:50 +0200 Subject: [PATCH] like git submodules without the git submodules part --- tests/real_world/.gitignore | 2 +- tests/real_world/clone.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/real_world/.gitignore b/tests/real_world/.gitignore index 4217392..c468fcf 100644 --- a/tests/real_world/.gitignore +++ b/tests/real_world/.gitignore @@ -1,3 +1,3 @@ /* !.gitignore -!clone.sh \ No newline at end of file +!clone.sh diff --git a/tests/real_world/clone.sh b/tests/real_world/clone.sh index 15403a0..38ccf00 100755 --- a/tests/real_world/clone.sh +++ b/tests/real_world/clone.sh @@ -7,11 +7,11 @@ set -euo pipefail SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) ensure_cloned() { - if [ ! -d "$1" ]; then + if [ ! -d "$SCRIPT_DIR/$2" ]; then git clone "$1" "$SCRIPT_DIR/$2" fi - (cd "$SCRIPT_DIR/$2" && git checkout "$3") + (cd "$SCRIPT_DIR/$2" && git checkout "$3" -q) } ensure_cloned "https://github.com/tsoding/noed.git" "tsoding_noed" "1c2bd182139080a8448a59589e8d457a7019d553"