fix(gschema-overrides): Ditch workaround for trimming newlines
It is no longer needed, since get_yaml_array uses `readarray -t` command now instead of regular `readarray`. It may also fix rare parsing issue some user had (array element looks fine, but it's still not parsed properly). Note that this is a speculated issue, not something we're 100% sure of. Merge this after BlueBuild transition period, since legacy build.sh doesn't have get_yaml_array fix. Alternatively, I can define custom get_yaml_array function here, with note for supporting legacy templates.
This commit is contained in:
parent
1d50642f88
commit
769cd4bf3d
1 changed files with 2 additions and 4 deletions
|
|
@ -20,7 +20,6 @@ fi
|
|||
# Abort build if included file does not have .gschema.override extension
|
||||
if [[ ${#INCLUDE[@]} -gt 0 ]]; then
|
||||
for file in "${INCLUDE[@]}"; do
|
||||
file="${file//$'\n'/}"
|
||||
if [[ $file == *.gschema.override ]]; then
|
||||
gschema_extension=true
|
||||
else
|
||||
|
|
@ -34,20 +33,19 @@ fi
|
|||
if [[ ${#INCLUDE[@]} -gt 0 ]] && $gschema_extension; then
|
||||
printf "Applying the following gschema-overrides:\n"
|
||||
for file in "${INCLUDE[@]}"; do
|
||||
file="${file//$'\n'/}"
|
||||
printf "%s\n" "$file"
|
||||
done
|
||||
mkdir -p "$schema_test_location" "$schema_location"
|
||||
find "$schema_location" -type f ! -name "*.gschema.override" -exec cp {} "$schema_test_location" \;
|
||||
for file in "${INCLUDE[@]}"; do
|
||||
file_path="${schema_include_location}/${file//$'\n'/}"
|
||||
file_path="${schema_include_location}/${file}"
|
||||
cp "$file_path" "$schema_test_location"
|
||||
done
|
||||
echo "Running error-checking test for your gschema-overrides. If test fails, build also fails."
|
||||
glib-compile-schemas --strict "$schema_test_location"
|
||||
echo "Compiling gschema to include your changes with gschema-override"
|
||||
for file in "${INCLUDE[@]}"; do
|
||||
file_path="${schema_test_location}/${file//$'\n'/}"
|
||||
file_path="${schema_test_location}/${file}"
|
||||
cp "$file_path" "$schema_location"
|
||||
done
|
||||
glib-compile-schemas "$schema_location" &>/dev/null
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue