Include and link physfs properly.
[tuxanci.git] / scripts / kr.sh
blob4977efc14662e610c9d6bc46936de98d3d03e950
1 #!/bin/sh
2 PWD=$(pwd)
3 [[ ${PWD/*\//} = scripts ]] && pushd .. > /dev/null || pushd . > /dev/null
5 if [ ! "$1" ]; then
6 echo "Help: this script indents code according to the K&R standard"
7 echo "Usage: $0 path/to/file.c"
8 exit 1
9 elif [ ! -e "$1" ]; then
10 echo "Error: file '$1' doesn't exist!"
11 exit 1
14 indent -kr -l79 -ts4 -ip4 -ppi 4 "$1"