aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-09-14 08:09:56 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-09-14 08:09:56 +0200
commit5a319c03d554c26271624e859a485056a7ca06af (patch)
tree8ebcf1b7cc8c5540267d24a0975a75411c6e04f8
parent73b8ac40b7fbb976f4317157925080da41d2983b (diff)
downloaddebian-edu-fai+itzks-5a319c03d554c26271624e859a485056a7ca06af.tar.gz
debian-edu-fai+itzks-5a319c03d554c26271624e859a485056a7ca06af.tar.bz2
debian-edu-fai+itzks-5a319c03d554c26271624e859a485056a7ca06af.zip
bin/debian-edu-fai_updateconfigspace: More reliably detect if we are in a Git working copy.
-rwxr-xr-xbin/debian-edu-fai_updateconfigspace2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/debian-edu-fai_updateconfigspace b/bin/debian-edu-fai_updateconfigspace
index 6b1632b..3d03349 100755
--- a/bin/debian-edu-fai_updateconfigspace
+++ b/bin/debian-edu-fai_updateconfigspace
@@ -46,7 +46,7 @@ if [ "${FAI_CONFIGDIR_REAL}" = "/usr/share/debian-edu-fai/fai/config" ]; then
echo "ERROR: FAI_CONFIGDIR points to '${FAI_CONFIGDIR_REAL}'."
echo "ERROR: Such a setup is not supported..."
exit 1
-elif [ -d "${FAI_CONFIGDIR_REAL}/.git" ]; then
+elif command -v git 1>/dev/null && [ "$(git rev-parse --is-inside-work-tree" 2>/dev/null) = "true" ]; then
# FAI config space is managed by Git, don't do anything then...
:
else