[nautilus/wip/oholy/ci-style-check: 21/25] run-uncrustify.sh: Use --replace instead of --no-backup option
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/oholy/ci-style-check: 21/25] run-uncrustify.sh: Use --replace instead of --no-backup option
- Date: Thu, 13 Feb 2020 14:47:20 +0000 (UTC)
commit 29c13e95f455f242d80ae6af6ac82f5971858abb
Author: Ondrej Holy <oholy redhat com>
Date: Tue Feb 4 08:38:34 2020 +0100
run-uncrustify.sh: Use --replace instead of --no-backup option
uncrustify is run with --no-backup option, which seems to be enough as
per the man pages, but it obviously doesn't work on Fedora 31 as it just
creates new files using ".uncrustify" suffix. Let's use --replace option
instead and remove the backup files manually to make it work as intended.
data/run-uncrustify.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/data/run-uncrustify.sh b/data/run-uncrustify.sh
index 78ac8d6cd..3f55113d3 100755
--- a/data/run-uncrustify.sh
+++ b/data/run-uncrustify.sh
@@ -20,7 +20,9 @@ do
for FILE in $(find "$DIR" -name "*.c" -not -path "*/gtk/*" -not -path "*/animation/*" -not -path
"*/audio-video-properties/*")
do
# Aligning prototypes is not working yet, so avoid headers
- "$UNCRUSTIFY" -c "$DATA/uncrustify.cfg" --no-backup "$FILE"
+ "$UNCRUSTIFY" -c "$DATA/uncrustify.cfg" --replace "$FILE"
"$DATA/lineup-parameters" "$FILE" > "$FILE.temp" && mv "$FILE.temp" "$FILE"
+ rm "$FILE.unc-backup.md5~"
+ rm "$FILE.unc-backup~"
done
done
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]