summaryrefslogtreecommitdiffstats
path: root/tools/git-setup.sh
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2024-05-03 17:44:49 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2024-05-05 14:49:21 +0200
commitf779fd1f8fbebe6d32feee619c0430ca142b9a6d (patch)
treee363c889813fea20b465de1569e01d09e8c59fd0 /tools/git-setup.sh
parentmeson: Remove --debug from mkosi arguments (diff)
downloadsystemd-f779fd1f8fbebe6d32feee619c0430ca142b9a6d.tar.xz
systemd-f779fd1f8fbebe6d32feee619c0430ca142b9a6d.zip
meson: Set up git submodule update on post checkout as well
Diffstat (limited to 'tools/git-setup.sh')
-rwxr-xr-xtools/git-setup.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/git-setup.sh b/tools/git-setup.sh
index a53f1790c1..8cc1bfdfc2 100755
--- a/tools/git-setup.sh
+++ b/tools/git-setup.sh
@@ -20,9 +20,15 @@ if [ -f .git/hooks/pre-commit.sample ] && [ ! -f .git/hooks/pre-commit ]; then
fi
if [ ! -f .git/hooks/post-rewrite ]; then
- cp -p tools/git-post-rewrite-hook.sh .git/hooks/post-rewrite
+ cp -p tools/git-submodule-update-hook.sh .git/hooks/post-rewrite
echo 'Activated post-rewrite hook'
ret=0
fi
+if [ ! -f .git/hooks/post-checkout ]; then
+ cp -p tools/git-submodule-update-hook.sh .git/hooks/post-checkout
+ echo 'Activated post-checkout hook'
+ ret=0
+fi
+
exit $ret