[X2Go-Commits] [maintenancescripts] 02/02: git/hooks/update-script._check_: check script name via $BASH_SOURCE[0] instead of using ${0} which may return the top-level invoking name.
git-admin at x2go.org
git-admin at x2go.org
Sat Sep 29 04:07:09 CEST 2018
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository maintenancescripts.
commit 148b9fbdd93a7bbb24927e068a6a032904ffad1f
Author: Mihai Moldovan <ionic at ionic.de>
Date: Sat Sep 29 04:06:56 2018 +0200
git/hooks/update-script._check_: check script name via $BASH_SOURCE[0] instead of using ${0} which may return the top-level invoking name.
---
git/hooks/update-script._check_ | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/git/hooks/update-script._check_ b/git/hooks/update-script._check_
index 63adcaf..7810f92 100755
--- a/git/hooks/update-script._check_
+++ b/git/hooks/update-script._check_
@@ -6,7 +6,8 @@ if [ -z "${UPDATE_DONE}" ]; then
UPDATE_DONE="1"
MERGE="0"
- [ "$(basename "${0}")" = "update-script_check+allow-merges_" ] && MERGE="1"
+ typeset script_basename="$(basename "${BASH_SOURCE[0]}")"
+ [ "${script_basename}" = "update-script_check+allow-merges_" ] && MERGE="1"
case "${1}" in
(refs/tags/*)
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git
More information about the x2go-commits
mailing list