From 02f1b503f4822f4738584cf712da078cce47d3bd Mon Sep 17 00:00:00 2001 From: Tomas Chvatal Date: Thu, 12 Mar 2009 13:43:22 +0100 Subject: Cleanup in root folder --- scripts/kr.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 scripts/kr.sh (limited to 'scripts/kr.sh') diff --git a/scripts/kr.sh b/scripts/kr.sh new file mode 100755 index 0000000..dbc1842 --- /dev/null +++ b/scripts/kr.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +if [ ! "$1" ]; then + echo "Help: this script indents code according to the K&R standard" + echo "Usage: $0 path/to/file.c" + exit 1 +elif [ ! -e "$1" ]; then + echo "Error: file '$1' doesn't exist!" + exit 1 +fi + +indent -kr -l79 -ts4 -ip4 -ppi 4 "$1" -- cgit v1.2.3