summaryrefslogtreecommitdiff
path: root/scripts/kr.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kr.sh')
-rwxr-xr-xscripts/kr.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/kr.sh b/scripts/kr.sh
index dbc1842..4977efc 100755
--- a/scripts/kr.sh
+++ b/scripts/kr.sh
@@ -1,4 +1,6 @@
#!/bin/sh
+PWD=$(pwd)
+[[ ${PWD/*\//} = scripts ]] && pushd .. > /dev/null || pushd . > /dev/null
if [ ! "$1" ]; then
echo "Help: this script indents code according to the K&R standard"