run-tests: make nixosSearch compatible with --copy-src

This commit is contained in:
Erik Arvstedt
2021-12-15 10:58:04 +01:00
parent 2069f62abc
commit f13ffe0146
3 changed files with 21 additions and 3 deletions
+13
View File
@@ -0,0 +1,13 @@
# Create and maintain a minimal git repo at the root of the copied src
(
cd "$scriptDir/.."
amend=--amend
if [[ ! -e .git ]]; then
git init
amend=
fi
git add .
if ! git diff --quiet --cached; then
git commit -a $amend -m -
fi
) >/dev/null