[X2Go-Commits] [maintenancescripts] 01/01: git/misc/update-repository-posixacls: don't update hook and ACL files iff they are symlinks.
git-admin at x2go.org
git-admin at x2go.org
Mon Mar 9 03:51:17 CET 2015
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository maintenancescripts.
commit 090dcff3927b8dec8784a22e640aaff7c16accc6
Author: Mihai Moldovan <ionic at ionic.de>
Date: Mon Mar 9 03:51:13 2015 +0100
git/misc/update-repository-posixacls: don't update hook and ACL files iff they are symlinks.
---
git/misc/update-repository-posixacls | 33 +++++++++++++++++++++------------
1 file changed, 21 insertions(+), 12 deletions(-)
diff --git a/git/misc/update-repository-posixacls b/git/misc/update-repository-posixacls
index 81d87cb..3e65482 100755
--- a/git/misc/update-repository-posixacls
+++ b/git/misc/update-repository-posixacls
@@ -11,28 +11,36 @@ pushd "${PACKAGE}.git"
# hooks
[ -f hooks/post-receive.tmp ] && {
- cp hooks/post-receive.tmp hooks/post-receive
- chmod 0755 hooks/post-receive
- rm hooks/post-receive.tmp
+ if ! [ -e hooks/post-receive ] || ! [ -L hooks/post-receive ]; then
+ cp hooks/post-receive.tmp hooks/post-receive
+ chmod 0755 hooks/post-receive
+ rm hooks/post-receive.tmp
+ fi
}
[ -f hooks/update.tmp ] && {
- cp hooks/update.tmp hooks/update
- chmod 0755 hooks/update
- rm hooks/update.tmp
+ if ! [ -e hooks/update ] || ! [ -L hooks/update ]; then
+ cp hooks/update.tmp hooks/update
+ chmod 0755 hooks/update
+ rm hooks/update.tmp
+ fi
}
# ACLs
[ -f info/allowed-users.tmp ] && {
- cp info/allowed-users.tmp info/allowed-users
- chmod 0640 info/allowed-users
- rm info/allowed-users.tmp
+ if ! [ -e info/allowed-users ] || ! [ -L info/allowed-users ]; then
+ cp info/allowed-users.tmp info/allowed-users
+ chmod 0640 info/allowed-users
+ rm info/allowed-users.tmp
+ fi
}
[ -f info/allowed-groups.tmp ] && {
- cp info/allowed-groups.tmp info/allowed-groups
- chmod 0640 info/allowed-groups
- rm info/allowed-groups.tmp
+ if ! [ -e info/allowed-groups ] || ! [ -L info/allowed-groups ]; then
+ cp info/allowed-groups.tmp info/allowed-groups
+ chmod 0640 info/allowed-groups
+ rm info/allowed-groups.tmp
+ fi
}
# configuration
@@ -53,5 +61,6 @@ pushd "${PACKAGE}.git"
chmod 0644 info/exclude
rm info/exclude.tmp
}
+
# Go back to the parent directory
popd
--
Alioth's /srv/git/code.x2go.org/maintenancescripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git
More information about the x2go-commits
mailing list