File: test.sh

package info (click to toggle)
vim-vimerl 1.4.1%2Bgit20120509.89111c7-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 212 kB
  • sloc: erlang: 1,002; sh: 12; makefile: 2
file content (20 lines) | stat: -rwxr-xr-x 311 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

#
# Uncomment the DEBUG macro from erlang_indent.erl
#

if [ $# != 1 ]
then
	echo "Usage: $0 <file>" >&2
	exit 1
fi

INDENTER=$(dirname $0)/../indent/erlang_indent.erl
LAST_LINE=$(wc -l $1 | cut -d ' ' -f 1)

for LINE in $(seq 1 $LAST_LINE)
do
	echo -n Line: $LINE '==> '
	$INDENTER -f $1 $LINE
done