2 if [ ! "$1" -a ! "$2" ]; then
3 echo "Usage: $0 output.schemas [--domain gettextdomain] file1.schemas [file2.schemas [...]]"
11 if [ "$1" = "--domain" ]; then
17 echo '<?xml version="1.0"?>' > "$OUTFILE"
18 echo '<mateconfschemafile><schemalist>' >> "$OUTFILE"
23 -e 's|<mateconfschemafile>||g' \
24 -e 's|</mateconfschemafile>||g' \
25 -e 's|<schemalist>||g' \
26 -e 's|</schemalist>||g' "$1" >> "$OUTFILE"
31 echo '</schemalist></mateconfschemafile>' >> "$OUTFILE"
32 if [ "$DOMAIN" != "" ]; then
33 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"