Files
archived-gir-files/reformat.sh
Marijn Suijten 41a0c5284d fix,reformat: Do not unnecessarily preserve whitespace
[ from https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/676/diffs?commit_id=27ff7b74eb95bda7cdfe769ea34c9689e005135d ]

When deleting elements -P/--pf preserves whitespace in front of the
elements, creating tons of unnecessary trailing whitespace on
otherwise-empty lines.
2021-01-06 21:06:22 +01:00

12 lines
215 B
Bash
Executable File

#!/bin/bash
set -x -e
# `///` used as `//` not works in Windows in this case
for file in *.gir; do
xmlstarlet ed -L \
-d '//_:doc/@line' \
-d '//_:doc/@filename' \
-d '///_:source-position' \
"$file"
done