summaryrefslogtreecommitdiffstats
path: root/bin/tidy-bowl
diff options
context:
space:
mode:
Diffstat (limited to 'bin/tidy-bowl')
-rwxr-xr-xbin/tidy-bowl10
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/tidy-bowl b/bin/tidy-bowl
index aac11a2..87e08c7 100755
--- a/bin/tidy-bowl
+++ b/bin/tidy-bowl
@@ -27,13 +27,15 @@
ME=`/bin/basename $0`
PREFIX=`/usr/bin/dirname $0`
########################################################################
-USAGE="Usage: ${ME} [-T tool] [-t tool-args] file..."
+USAGE="Usage: ${ME} [-T tool] [-n] [-t tool-args] file..."
NORMTOOL=${PREFIX}/xmlformat
-NORMARGS="-i -v -f ${PREFIX}/xmlformat-fdp.conf"
-while getopts T:t: c
+NORMARGS="-v -f ${PREFIX}/xmlformat-fdp.conf"
+INPLACE='-i'
+while getopts T:nt: c
do
case "${c}" in
T) NORMTOOL="${OPTARG}";;
+ n) INPLACE="";;
t) NORMARGS="${OPTARG}";;
*) /bin/echo "${USAGE}" >&2; exit 1;;
esac
@@ -50,7 +52,7 @@ do
exit 1
fi
# Try to clean it up
- ${NORMTOOL} ${NORMARGS} "${fn}"
+ ${NORMTOOL} ${NORMARGS} ${INPLACE} "${fn}"
if [ $? -ne 0 ]; then
/bin/echo $0 "File '${fn}' unclean."
exit 1