-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_schema_list
More file actions
executable file
·37 lines (29 loc) · 914 Bytes
/
setup_schema_list
File metadata and controls
executable file
·37 lines (29 loc) · 914 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
# Usage:
# ./setup_schema_list
#
# Output:
# Produces lines with a schema name and the file which the schema
# is defined. The list will be in alphabetical order according
# to the schema names.
target=schemas.list
if [[ -e $target ]]; then
echo "Deleting previous $target"
rm -f "$target"
fi
source_dir=$(dirname $(locate gschemas.compiled))
sources=("$source_dir"/*)
for fname in "${sources[@]}"
do
if [[ $fname =~ xml ]]; then
xsltproc -stringparam schemafile "$fname" setup_getschemas.xsl "$fname" >> "$target"
fi
done
# LC_ALL=C is needed so punctuation is included in the sort.
# For example, org.compiz is otherwise sorted between
# org.compiz.vpswitch and org.compiz.unityshell.
LC_ALL=C sort -t $'\t' -k 1 $target > $target.temp
./util_identify_relocatables \
-v rlist="$(gsettings list-relocatable-schemas)" \
"$target.temp" > $target
rm $target.temp