2018-02-05 03:38:24 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-03-02 01:06:45 +00:00
|
|
|
make messages.po > /dev/null 2>&1
|
|
|
|
|
|
|
|
# This monstrosity asks how many lines changed, but it ignores changes to the
|
|
|
|
# "POT-Creation-Date" line. In other words, if all that's changed is the
|
|
|
|
# "POT-Creation-Date", don't bother adding messages.po
|
|
|
|
lines_changed=$(git -c difftool.ignorepot.cmd='diff -u -I "POT-Creation-Date" "$LOCAL" "$REMOTE"' difftool -t ignorepot -y messages.po | wc -l)
|
|
|
|
|
|
|
|
if [ "$lines_changed" = 0 ]; then
|
|
|
|
git checkout messages.po
|
|
|
|
else
|
|
|
|
git add messages.po
|
|
|
|
fi
|