summaryrefslogtreecommitdiffstats
path: root/abs/extra-testing/gconf/gconf-merge-schema
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2009-05-02 08:55:02 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2009-05-02 08:55:02 (GMT)
commit25e39d3ad6f66fad48c0183dd568e2fbfded5ca2 (patch)
tree0d8bb2c9bca3a20c3ac2067ff7453c0aae5e8a3e /abs/extra-testing/gconf/gconf-merge-schema
parent1f70585d4abb80a2cc47316ab2b4851637939997 (diff)
downloadlinhes_pkgbuild-25e39d3ad6f66fad48c0183dd568e2fbfded5ca2.zip
linhes_pkgbuild-25e39d3ad6f66fad48c0183dd568e2fbfded5ca2.tar.gz
linhes_pkgbuild-25e39d3ad6f66fad48c0183dd568e2fbfded5ca2.tar.bz2
Latest version or newly required deps for various packages.
Diffstat (limited to 'abs/extra-testing/gconf/gconf-merge-schema')
-rwxr-xr-xabs/extra-testing/gconf/gconf-merge-schema22
1 files changed, 17 insertions, 5 deletions
diff --git a/abs/extra-testing/gconf/gconf-merge-schema b/abs/extra-testing/gconf/gconf-merge-schema
index 323e0ec..992c162 100755
--- a/abs/extra-testing/gconf/gconf-merge-schema
+++ b/abs/extra-testing/gconf/gconf-merge-schema
@@ -1,22 +1,34 @@
-#!/bin/sh
+#!/bin/bash
if [ ! "$1" -a ! "$2" ]; then
- echo "Usage: $0 output.schemas file1.schemas [file2.schemas [...]]"
+ 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 '<?xml version="1.0"?>' > "$OUTFILE"
echo '<gconfschemafile><schemalist>' >> "$OUTFILE"
while [ "$1" ]; do
if [ -f "$1" ]; then
- sed -e '/<?xml/d' -e 's|<gconfschemafile>||g' -e 's|</gconfschemafile>||g' \
- -e 's|<schemalist>||g' -e 's|</schemalist>||g' \
- "$1" >> "$OUTFILE"
+ sed -e '/<?xml/d' \
+ -e 's|<gconfschemafile>||g' \
+ -e 's|</gconfschemafile>||g' \
+ -e 's|<schemalist>||g' \
+ -e 's|</schemalist>||g' "$1" >> "$OUTFILE"
fi
shift
done
echo '</schemalist></gconfschemafile>' >> "$OUTFILE"
+if [ "$DOMAIN" != "" ]; then
+ sed -ri "s/^([[:space:]]*)(<locale name=\"C\">)/\1<gettext_domain>$DOMAIN<\/gettext_domain>\n\1\2/; /^[[:space:]]*<locale name=\"[^C]/,/^[[:space:]]*<\/locale>[[:space:]]*\$/ d; /^$/d; s/<\/schema>$/&\n/" "$OUTFILE"
+fi