Merge pull request #18500 from eileenmcnaughton/loc
[civicrm-core.git] / tools / scripts / git / commit-msg
1 #!/bin/bash
2
3 # Note: This shell script should be designed and tested for cross-platform use
4
5 set -e
6
7 if [ "$GIT_CANONICAL_REPO_NAME" = "civicrm-core" ]; then
8 PACKAGES="$GIT_DIR/../packages"
9 else
10 PACKAGES="$GIT_DIR/../../packages"
11 fi
12
13 if [ -f "$PACKAGES/git-footnote/bin/git-footnote" ]; then
14 FILE="$1"
15 TMPFILE="$1.jira"
16 cp -p "$FILE" "$TMPFILE"
17 $PACKAGES/git-footnote/bin/git-footnote CRM https://issues.civicrm.org/jira < "$TMPFILE" > "$FILE"
18 rm -f "$TMPFILE"
19 fi