summaryrefslogtreecommitdiff
path: root/bin/autoindent
diff options
context:
space:
mode:
authorshumakl <shumakl@purdue.edu>2014-04-03 11:51:37 -0400
committershumakl <shumakl@purdue.edu>2014-04-03 11:51:37 -0400
commitbed5a14c1e8bd4af7a066664f0ec2b57979bc96b (patch)
tree17271699ef186edcfa80df38afefd4540798a3a6 /bin/autoindent
parentef22599880973aae8464bacb82e3a04d6277bc43 (diff)
modify generate.sh to use tab-indent in the app/ directory
Diffstat (limited to 'bin/autoindent')
-rwxr-xr-xbin/autoindent10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/autoindent b/bin/autoindent
new file mode 100755
index 0000000..c45da1e
--- /dev/null
+++ b/bin/autoindent
@@ -0,0 +1,10 @@
+#!/bin/bash
+file=$1
+sed -i 's/^\s*//' "$file"
+emacs --batch "$file" \
+ --eval '(setq indent-tabs-mode t)' \
+ --eval '(setq ruby-indent-level 4)' \
+ --eval '(setq tab-width 4)' \
+ --eval '(setq make-backup-files nil)' \
+ --eval '(indent-region (point-min) (point-max) nil)' \
+ -f save-buffer