mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Make pre-commit Git hook POSIX compliant and executable.
PR: https://github.com/loot/loot/pull/629
This commit is contained in:
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user