diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2011-06-06 10:53:10 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2011-06-06 10:53:10 +0200 |
commit | 5e0aad9befe6214134a77cb267b8c89596945109 (patch) | |
tree | 8d36d513b370c05588fc8c4f696a810a25eab9e2 | |
parent | f097b98956deee68f32c3d16e59a95ff253453bb (diff) | |
download | k8055-5e0aad9befe6214134a77cb267b8c89596945109.zip k8055-5e0aad9befe6214134a77cb267b8c89596945109.tar.gz |
add reformat
-rwxr-xr-x | reformat | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/reformat b/reformat new file mode 100755 index 0000000..1b98e8c --- /dev/null +++ b/reformat @@ -0,0 +1,22 @@ +#! /bin/bash + +ASTYLEOPTS="-v \ + --indent=spaces=4 \ + --brackets=attach \ + --pad-paren-in \ + --indent-classes \ + --indent-preprocessor \ + --align-pointer=type \ + --suffix=none \ + --formatted + " +if [ $# -eq 0 ]; then + echo "need at least one argument" && exit 1 +fi + +CMD=$(which astyle) +if [ "X${CMD}" != "X" ]; then + echo $CMD $ASTYLEOPTS $@ + $CMD $ASTYLEOPTS $@ +fi + |