mirror of
https://github.com/Noratrieb/libuwuc.git
synced 2026-01-16 04:35:05 +01:00
like git submodules without the git submodules part
This commit is contained in:
parent
2f52743d63
commit
119d0f1443
2 changed files with 3 additions and 3 deletions
2
tests/real_world/.gitignore
vendored
2
tests/real_world/.gitignore
vendored
|
|
@ -1,3 +1,3 @@
|
||||||
/*
|
/*
|
||||||
!.gitignore
|
!.gitignore
|
||||||
!clone.sh
|
!clone.sh
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,11 @@ set -euo pipefail
|
||||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
|
|
||||||
ensure_cloned() {
|
ensure_cloned() {
|
||||||
if [ ! -d "$1" ]; then
|
if [ ! -d "$SCRIPT_DIR/$2" ]; then
|
||||||
git clone "$1" "$SCRIPT_DIR/$2"
|
git clone "$1" "$SCRIPT_DIR/$2"
|
||||||
fi
|
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"
|
ensure_cloned "https://github.com/tsoding/noed.git" "tsoding_noed" "1c2bd182139080a8448a59589e8d457a7019d553"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue