From 1a6abb5e1b973e92ee87f830c9e9ad115499574f Mon Sep 17 00:00:00 2001 From: Anton Lydike Date: Sun, 22 Aug 2021 19:55:13 +0200 Subject: [PATCH] added cleanup.sh file that cleans up all source code --- cleanup.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 cleanup.sh diff --git a/cleanup.sh b/cleanup.sh new file mode 100755 index 0000000..54edfcf --- /dev/null +++ b/cleanup.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +source=$(find -regex '.*\.[ch]') + +assembly_source=$(find -iname '*.S') + +extended_source=$(find -iname '*.py') + + +# remove trailing whitespaces from non-uncrustifyable source +echo $assembly_source $extended_source Makefile | xargs sed -i 's/[[:space:]]*$//' + +# run uncrustify on source +uncrustify --replace --no-backup -c uncrustify.cfg $source \ No newline at end of file