glib: Fix setup hook

It was not robust against multiple matching directories, as the called
function takes exactly 3 arguments.
This commit is contained in:
John Ericson 2019-11-05 19:11:37 -05:00
parent 2c1d9d8bc1
commit 770a4c7946

View File

@ -1,9 +1,11 @@
make_glib_find_gsettings_schemas() {
# For packages that need gschemas of other packages (e.g. empathy)
if [ -d "$1"/share/gsettings-schemas/*/glib-2.0/schemas ]; then
addToSearchPath GSETTINGS_SCHEMAS_PATH "$1/share/gsettings-schemas/"*
fi
for maybe_dir in "$1"/share/gsettings-schemas/*/glib-2.0; do
if [[ -d "$maybe_dir/schemas" ]]; then
addToSearchPath GSETTINGS_SCHEMAS_PATH "$maybe_dir"
fi
done
}
addEnvHooks "$hostOffset" make_glib_find_gsettings_schemas