Updated script per suggestion by @g-oikonomou to allow script to operate on files in subdirectories

This commit is contained in:
Adam Dunkels 2012-11-20 20:11:01 +01:00
parent 9131c4183b
commit f6f9df802c

View file

@ -1,8 +1,9 @@
#!/bin/sh #!/bin/sh
f=`basename $1`
mkdir /tmp/$$ mkdir /tmp/$$
cp $1 /tmp/$$/ cp $1 /tmp/$$/
cp $1 /tmp/$$/$1.orig cp $1 /tmp/$$/$f.orig
export INDENT_PROFILE=`dirname $0`/indent.pro export INDENT_PROFILE=`dirname $0`/indent.pro
indent /tmp/$$/$1 indent /tmp/$$/$f
diff /tmp/$$/$1.orig /tmp/$$/$1 diff /tmp/$$/$f.orig /tmp/$$/$f
rm -rf /tmp/$$ rm -rf /tmp/$$