From 688ade8e628f47ff03a5d09f269e59bcfcfe5a8c Mon Sep 17 00:00:00 2001 From: sibel Date: Mon, 19 Apr 2010 15:46:23 +0200 Subject: Maj de gconf#2.28.1-1 --- extra/gconf/gconf-merge-schema | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 extra/gconf/gconf-merge-schema (limited to 'extra/gconf/gconf-merge-schema') diff --git a/extra/gconf/gconf-merge-schema b/extra/gconf/gconf-merge-schema new file mode 100644 index 000000000..992c162e6 --- /dev/null +++ b/extra/gconf/gconf-merge-schema @@ -0,0 +1,34 @@ +#!/bin/bash +if [ ! "$1" -a ! "$2" ]; then + echo "Usage: $0 output.schemas [--domain gettextdomain] file1.schemas [file2.schemas [...]]" + exit 1 +fi + +OUTFILE="$1" +DOMAIN="" +shift + +if [ "$1" = "--domain" ]; then + shift + DOMAIN=$1 + shift +fi + +echo '' > "$OUTFILE" +echo '' >> "$OUTFILE" + +while [ "$1" ]; do + if [ -f "$1" ]; then + sed -e '/||g' \ + -e 's|||g' \ + -e 's|||g' \ + -e 's|||g' "$1" >> "$OUTFILE" + fi + shift +done + +echo '' >> "$OUTFILE" +if [ "$DOMAIN" != "" ]; then + sed -ri "s/^([[:space:]]*)()/\1$DOMAIN<\/gettext_domain>\n\1\2/; /^[[:space:]]*[[:space:]]*\$/ d; /^$/d; s/<\/schema>$/&\n/" "$OUTFILE" +fi -- cgit v1.2.3-70-g09d2