From 0aea0f206363f2a8a5284c1173bc2db30804598f Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Fri, 29 Aug 1997 21:20:09 +0000 Subject: Cleanup. --- src/PGINDENT | 24 ++++++++++++++++++++++++ src/tools/PGINDENT | 24 ------------------------ 2 files changed, 24 insertions(+), 24 deletions(-) create mode 100644 src/PGINDENT delete mode 100644 src/tools/PGINDENT (limited to 'src') diff --git a/src/PGINDENT b/src/PGINDENT new file mode 100644 index 00000000000..2b0b72799a6 --- /dev/null +++ b/src/PGINDENT @@ -0,0 +1,24 @@ +#!/bin/sh +trap "rm -f /tmp/$$" 0 1 2 3 15 +entab /dev/null +if [ "$?" -ne 0 ] +then echo "Go to the src/tools/entab directory and do a 'make' and 'make install'." >&2 + echo "This will put the 'entab' command in your path." >&2 + echo "Then run $0 again." + exit 1 +fi +indent -st /dev/null +if [ "$?" -ne 0 ] +then echo "You do not appear to have 'indent' installed on your system." >&2 + exit 1 +fi +for FILE +do + cat $FILE | + sed 's;/\* *---;/*---;g' | + indent -bad -bap -bbb -bc -bl -d0 -ncdb -nce -cli1 -di16 -nfc1 \ + -lp -nip -nbc -psl -di1 -i4 -st | + detab -t8 | + entab -qc -t4 | + sed 's;/\*---;/* ---;g' >/tmp/$$ && cat /tmp/$$ >$FILE +done diff --git a/src/tools/PGINDENT b/src/tools/PGINDENT deleted file mode 100644 index 2b0b72799a6..00000000000 --- a/src/tools/PGINDENT +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -trap "rm -f /tmp/$$" 0 1 2 3 15 -entab /dev/null -if [ "$?" -ne 0 ] -then echo "Go to the src/tools/entab directory and do a 'make' and 'make install'." >&2 - echo "This will put the 'entab' command in your path." >&2 - echo "Then run $0 again." - exit 1 -fi -indent -st /dev/null -if [ "$?" -ne 0 ] -then echo "You do not appear to have 'indent' installed on your system." >&2 - exit 1 -fi -for FILE -do - cat $FILE | - sed 's;/\* *---;/*---;g' | - indent -bad -bap -bbb -bc -bl -d0 -ncdb -nce -cli1 -di16 -nfc1 \ - -lp -nip -nbc -psl -di1 -i4 -st | - detab -t8 | - entab -qc -t4 | - sed 's;/\*---;/* ---;g' >/tmp/$$ && cat /tmp/$$ >$FILE -done -- cgit v1.2.3