cb1664bc41
Copy from home:sbrabec:branches:openSUSE:Factory/translation-update-upstream based on submit request 22521 from user sbrabec OBS-URL: https://build.opensuse.org/request/show/22521 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/translation-update-upstream?expand=0&rev=4
22 lines
706 B
Bash
22 lines
706 B
Bash
#!/bin/bash
|
|
# helper script for msgheadermerge
|
|
PO_HEADER_DIR=$1
|
|
if mkdir 2>/dev/null $PO_HEADER_DIR.merge-dir ; then
|
|
while read ; do
|
|
TAG=${REPLY%%:*}
|
|
if test "$TAG" = "$REPLY" -o -z "$TAG" ; then
|
|
echo "ERROR: Malformed header line $PO_HEADER_DIR/$TAG. Ignoring." >&2
|
|
else
|
|
TAG=${TAG//\//__SLASH__} # safety check
|
|
VALUE=${REPLY#*:}
|
|
VALUE=${VALUE# }
|
|
echo >"$PO_HEADER_DIR.merge-dir/$TAG" "$VALUE"
|
|
echo >>$PO_HEADER_DIR.order "$TAG"
|
|
fi
|
|
done
|
|
touch -d "$(<$PO_HEADER_DIR.merge-dir/POT-Creation-Date)" $PO_HEADER_DIR.merge-dir/POT-Creation-Date
|
|
touch -d "$(<$PO_HEADER_DIR.merge-dir/PO-Revision-Date)" $PO_HEADER_DIR.merge-dir/PO-Revision-Date
|
|
else
|
|
exit 1
|
|
fi
|