diff options
author | Bruce Momjian | 1999-06-05 19:09:48 +0000 |
---|---|---|
committer | Bruce Momjian | 1999-06-05 19:09:48 +0000 |
commit | 27b8143944dc0585597bdaa3ae5e5b49a4760def (patch) | |
tree | fb576673bee591564b1dedd300cd0732e341388c /contrib/tools/add-emacs-variables | |
parent | 977108e8d9ae68cac5ec6f2908e03bd7b46fdbc7 (diff) |
Hi,
I have updated my contrib code for version 6.5. In the attachment you will
find the directories array, datetime, miscutil, string, tools and userlocks
which replace the corresponding directories under contrib.
In contrib/tools you will find some developement scripts which I use while
hacking the sources. I hope they will be useful for some other people.
I have also added a contrib/Makefile which tries to compile and install all
the contribs. Unfortunately many of them don't have a Makefile or don't
compile cleanly.
--
Massimo Dal Zotto
Diffstat (limited to 'contrib/tools/add-emacs-variables')
-rwxr-xr-x | contrib/tools/add-emacs-variables | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/contrib/tools/add-emacs-variables b/contrib/tools/add-emacs-variables new file mode 100755 index 00000000000..7b50aef6593 --- /dev/null +++ b/contrib/tools/add-emacs-variables @@ -0,0 +1,28 @@ +#!/bin/bash +# +# Add local variables to C sources files to set emacs C style to 4-space tabs. +# +# Usage: cd $PG_HOME && add-emacs-variables `find . -name \*.[chy] -print` + +for f in $*; do + if [ -L $f ] || grep -q '^ \* Local Variables:' $f; then + continue + fi + echo $f + touch -r $f /tmp/.add-local-variables.$$ + cat <<- ' EOF' >> $f + + /* + * Local Variables: + * tab-width: 4 + * c-indent-level: 4 + * c-basic-offset: 4 + * End: + */ + EOF + touch -r /tmp/.add-local-variables.$$ $f +done + +rm -f /tmp/.add-local-variables.$$ + +# end of file |