Make pre-commit Git hook POSIX compliant and executable.

PR: https://github.com/loot/loot/pull/629
This commit is contained in:
Frederik “Freso” S. Olesen
2016-08-04 22:45:49 +02:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: LOOT 0.9.2\n"
"Report-Msgid-Bugs-To: https://github.com/loot/loot/issues\n"
"POT-Creation-Date: 2016-08-04 18:29+0100\n"
"POT-Creation-Date: 2016-08-04 21:46+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Regular → Executable
+1 -1
View File
@@ -12,7 +12,7 @@ sed -i 's|charset=CHARSET|charset=UTF-8|' resources/l10n/template.pot
LINES_ADDED=$(git diff --numstat resources/l10n/template.pot | cut -f 1)
LINES_REMOVED=$(git diff --numstat resources/l10n/template.pot | cut -f 2)
if [[ "$LINES_ADDED" -eq "$LINES_REMOVED" && "$LINES_ADDED" -eq 1 ]]; then
if [ "$LINES_ADDED" = "$LINES_REMOVED" -a "$LINES_ADDED" = "1" ]; then
git checkout -- resources/l10n/template.pot
else
git add resources/l10n/template.pot