Sha256: 69bf8719199305a19daa403a60831b5bbc89c367d22739f53d12b86d47a0ae23

Contents?: true

Size: 516 Bytes

Versions: 24

Compression:

Stored size: 516 Bytes

Contents

#!/bin/sh
#
# git-merge-po --
# 
#   Custom Git merge driver - merges PO files using msgcat(1)
# 
O=$1
A=$2
B=$3

# Extract the PO header from the current branch (top of file until first empty line)
header=$(mktemp /tmp/merge-po.XXXX)
sed -e '/^$/q' < $A > $header

# Merge files, then repair header
temp=$(mktemp /tmp/merge-po.XXXX)
msgcat -o $temp $A $B
msgcat --use-first -o $A $header $temp

# Clean up
rm $header $temp

# Check for conflicts
conflicts=$(grep -c "#-#" $A)
test $conflicts -gt 0 && exit 1
exit 0

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
git-whistles-0.10.0 libexec/git-merge-po.sh
git-whistles-0.9.1 libexec/git-merge-po.sh
git-whistles-0.9.0 libexec/git-merge-po.sh
git-whistles-0.8.2 libexec/git-merge-po.sh
git-whistles-0.8.1 libexec/git-merge-po.sh
git-whistles-0.8.0 libexec/git-merge-po.sh
git-whistles-0.7.7 libexec/git-merge-po.sh
git-whistles-0.7.6 libexec/git-merge-po.sh
git-whistles-0.7.5 libexec/git-merge-po.sh
git-whistles-0.7.4 libexec/git-merge-po.sh
git-whistles-0.7.3 libexec/git-merge-po.sh
git-whistles-0.7.2 libexec/git-merge-po.sh
git-whistles-0.7.1 libexec/git-merge-po.sh
git-whistles-0.7.0 libexec/git-merge-po.sh
git-whistles-0.6.3 libexec/git-merge-po.sh
git-whistles-0.6.2 libexec/git-merge-po.sh
git-whistles-0.6.1 libexec/git-merge-po.sh
git-whistles-0.5.1 libexec/git-merge-po.sh
git-whistles-0.5.0 libexec/git-merge-po.sh
git-whistles-0.4.4 libexec/git-merge-po.sh