[X2Go-Commits] [maintenancescripts] 05/06: git/hooks/x2go-post-receive-tag-pending: more curly braces, quoting and backtick to $() changes.
git-admin at x2go.org
git-admin at x2go.org
Mon Feb 23 21:55:28 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 b813d7f39efaa89a0a7788c0e9bd82896919c135
Author: Mihai Moldovan <ionic at ionic.de>
Date: Mon Feb 23 21:54:19 2015 +0100
git/hooks/x2go-post-receive-tag-pending: more curly braces, quoting and backtick to $() changes.
---
git/hooks/x2go-post-receive-tag-pending | 36 +++++++++++++++----------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/git/hooks/x2go-post-receive-tag-pending b/git/hooks/x2go-post-receive-tag-pending
index 2a931e1..26089d4 100755
--- a/git/hooks/x2go-post-receive-tag-pending
+++ b/git/hooks/x2go-post-receive-tag-pending
@@ -25,46 +25,46 @@ BASEURL="http://code.x2go.org/gitweb?p=${GIT_REPO_NAME}"
PROJECT="${GIT_REPO_NAME//.git/}"
-tempdir=`mktemp -d`
+tempdir="$(mktemp -d)"
trap "rm -rf \"${tempdir}\"" EXIT
-send_mail() { # send_mail bugno revno diff_file
- local bug="$1"
- local fixed_in_version="$2"
- local rev="$3"
- local diff="$4"
- local from=$(git show -s --pretty='format:%cn <%ce>' $rev |
- perl -CI -MEncode -e 'print Encode::encode("MIME-Q", <STDIN>)')
+function send_mail() { # send_mail bugno revno diff_file
+ local bug="${1}"
+ local fixed_in_version="${2}"
+ local rev="${3}"
+ local diff="${4}"
+ local from="$(git show -s --pretty='format:%cn <%ce>' "${rev}" |
+ perl -CI -MEncode -e 'print Encode::encode("MIME-Q", <STDIN>)')"
(cat <<EOF
-From: $from
-To: $bug-submitter at bugs.x2go.org
-Cc: control at bugs.x2go.org, $bug at bugs.x2go.org
-Subject: X2Go issue (in src:$PROJECT) has been marked as pending for release
+From: ${from}
+To: ${bug}-submitter at bugs.x2go.org
+Cc: control at bugs.x2go.org, ${bug}@bugs.x2go.org
+Subject: X2Go issue (in src:${PROJECT}) has been marked as pending for release
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
X-Mailer: http://snipr.com/post-receive-tag-pending
-tag #$bug pending
-fixed #$bug $version
+tag #${bug} pending
+fixed #${bug} ${version}
thanks
Hello,
-X2Go issue #$bug (src:$PROJECT) reported by you has been
+X2Go issue #${bug} (src:${PROJECT}) reported by you has been
fixed in X2Go Git. You can see the changelog below, and you can
check the diff of the fix at:
- ${BASEURL};a=commitdiff;h=`git show -s --pretty='format:%h' "$rev"`
+ ${BASEURL};a=commitdiff;h=$(git show -s --pretty='format:%h' "$rev")
-The issue will most likely be fixed in src:$PROJECT ($version).
+The issue will most likely be fixed in src:${PROJECT} (${version}).
light+love
X2Go Git Admin (on behalf of the sender of this mail)
---
EOF
- cat "$diff") | /usr/sbin/sendmail -oi -t
+ cat "${diff}") | /usr/sbin/sendmail -oi -t
}
while read oldrev newrev refname; do
--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git
More information about the x2go-commits
mailing list