fix.sh: Incorporate reformat.sh

From https://github.com/gtk-rs/gir-files/blob/master/reformat.sh
This commit is contained in:
Vivia Nikolaidou 2020-04-30 13:36:20 +03:00
parent 1d2609d448
commit c6831ca28a

View file

@ -1,6 +1,16 @@
#!/bin/bash
set -x -e
# https://github.com/gtk-rs/gir-files/blob/master/reformat.sh
# `///` used as `//` not works in Windows in this case
for file in *.gir; do
xmlstarlet ed -P -L \
-d '//_:doc/@line' \
-d '//_:doc/@filename' \
-d '///_:source-position' \
"$file"
done
# replace wayland structures to gpointers
xmlstarlet ed --pf --inplace \
--update '//*[@c:type="wl_display*"]/@c:type' \