From 20ab7b7c36d3299236ba75d62efc7b1543752e0b Mon Sep 17 00:00:00 2001 From: jpekkila Date: Tue, 14 Jan 2020 22:09:43 +0200 Subject: [PATCH] Readded scripts/fix_style.sh. It seems to have disappeared at some point, have no idea. Use with care. --- scripts/fix_style.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 scripts/fix_style.sh diff --git a/scripts/fix_style.sh b/scripts/fix_style.sh new file mode 100755 index 0000000..1131b81 --- /dev/null +++ b/scripts/fix_style.sh @@ -0,0 +1,9 @@ +#!/bin/bash +if [[ $1 == "DO" && $2 == "IT!" ]]; then + find -name \*.h -o -name \*.cc -o -name \*.c | xargs clang-format -i -style=file + echo "It is done." +else + find -name \*.h -o -name \*.cc -o -name \*.c + echo "I'm going to try to fix the style of these files." + echo "If you're absolutely sure, give \"DO IT!\" as a parameter." +fi