Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2017-06-21 18:26:21 +0000
committerTom Lane2017-06-21 18:26:21 +0000
commit8ff6d4ec7840b0af56f1207073f44b7f2afae96d (patch)
tree3e2f7dc12bb906186a40f0f0b256db1597c9ce05 /src/tools/pgindent/pgcppindent
parent9ef2dbefc7fb3ac22e1528bc22a41a5c6c6a9539 (diff)
Adjust pgindent script to use pg_bsd_indent 2.0.
Update version-checking code and list of switches. Delete obsolete quasi-support for using GNU indent. Remove a lot of no-longer-needed workarounds for bugs of the old version, and improve comments for the hacks that remain. Update run_build() subroutine to fetch the pg_bsd_indent code from the newly established git repo for it. In passing, fix pgindent to not overwrite files that require no changes; this makes it a bit more friendly to run on a built tree. Adjust relevant documentation. Remove indent.bsd.patch; it's not relevant anymore (and was obsolete long ago anyway). Likewise remove pgcppindent, since we're no longer in the business of shipping C++ code. Piotr Stefaniak is responsible for most of the algorithmic changes to the pgindent script; I did the rest. Discussion: https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.org Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
Diffstat (limited to 'src/tools/pgindent/pgcppindent')
-rwxr-xr-xsrc/tools/pgindent/pgcppindent29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/tools/pgindent/pgcppindent b/src/tools/pgindent/pgcppindent
deleted file mode 100755
index 59ddf4baca3..00000000000
--- a/src/tools/pgindent/pgcppindent
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-# src/tools/pgindent/pgcppindent
-
-trap "rm -f /tmp/$$ /tmp/$$a" 0 1 2 3 15
-entab </dev/null >/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
-astyle --version </dev/null >/dev/null 2>&1
-if [ "$?" -eq 0 ]
-then echo "You do not appear to have 'astyle' installed on your system." >&2
- exit 1
-fi
-
-for FILE
-do
- astyle --style=ansi -b -p -S < "$FILE" >/tmp/$$ 2>/tmp/$$a
- if [ "$?" -ne 0 -o -s /tmp/$$a ]
- then echo "$FILE"
- cat /tmp/$$a
- fi
- cat /tmp/$$ |
- entab -t4 -qc |
- cat >/tmp/$$a && cat /tmp/$$a >"$FILE"
-done