File msgmerge of Package vdr

#!/bin/bash
# wrapper script for msgmerge to avoid changed POT-Creation-Date:
# on every rebuild.
# (C) 2014 Stefan Seyfried, License: WTFPL v2
#
# msgmerge is called like that in vdr makefiles
# msgmerge -U --no-wrap --no-location --backup=none -q -N po/lt_LT.po po/skincurses.pot
ARGS="$@"
NUM=$#
shift $((NUM - 2))
IN="$1"
CREATE=$(grep ^\"POT-Creation-Date: "$IN")
CREATE=${CREATE//\\/\\\\} # double the backslashes...
/usr/bin/msgmerge $ARGS
RET=$?
sed -i -e s#^.POT-Creation-Date:.*#"$CREATE"# "$IN"
exit $RET
openSUSE Build Service is sponsored by