]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/uncrustify.sh
Move scripts to qcsrc/tools
[xonotic/xonotic-data.pk3dir.git] / qcsrc / uncrustify.sh
diff --git a/qcsrc/uncrustify.sh b/qcsrc/uncrustify.sh
deleted file mode 100755 (executable)
index b36953e..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-fix_function_types() {
-       # Uncrustify handles QC function types (example:
-       #  void(void) func;
-       # ) wrong and removes the space between type and variable. Fix this by
-       # a simple sed on ")letter" which should normally not occur.
-       sed -e 's/)\([A-Za-z_]\)/) \1/g' "$@"
-}
-
-if [ -z "$UNCRUSTIFY_CONFIG" ]; then
-       UNCRUSTIFY_CONFIG=`git rev-parse --show-toplevel`/qcsrc/uncrustify.cfg
-fi
-
-case "$#" in
-       0)
-               uncrustify --frag -c "$UNCRUSTIFY_CONFIG" |\
-               fix_function_types
-               ;;
-       *)
-               uncrustify --replace --no-backup -c "$UNCRUSTIFY_CONFIG" "$@" ;\
-               fix_function_types -i "$@"
-               ;;
-esac