diff options
| author | Peter Eisentraut <peter_e@gmx.net> | 2000-09-01 13:15:27 +0000 |
|---|---|---|
| committer | Peter Eisentraut <peter_e@gmx.net> | 2000-09-01 13:15:27 +0000 |
| commit | 4bfb75aecef84117c6374815b49818d4d6ca2678 (patch) | |
| tree | b5758c8cb876519cb238caff690d97707cf44cc8 /src/bin/initdb/Makefile | |
| parent | 424f0edcb8d73446223f1812d3ca88150e1cc953 (diff) | |
| download | postgresql-4bfb75aecef84117c6374815b49818d4d6ca2678.tar.gz | |
Change initdb to not delete PGDATA directory unless it was created by
initdb itself. Refuse to run on existing but non-empty PGDATA directory.
Diffstat (limited to 'src/bin/initdb/Makefile')
| -rw-r--r-- | src/bin/initdb/Makefile | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/bin/initdb/Makefile b/src/bin/initdb/Makefile index b219a2d9b4..f8f656f81c 100644 --- a/src/bin/initdb/Makefile +++ b/src/bin/initdb/Makefile @@ -4,7 +4,7 @@ # # Copyright (c) 1994, Regents of the University of California # -# $Header: /cvsroot/pgsql/src/bin/initdb/Makefile,v 1.21 2000/08/31 16:11:06 petere Exp $ +# $Header: /cvsroot/pgsql/src/bin/initdb/Makefile,v 1.22 2000/09/01 13:15:27 petere Exp $ # #------------------------------------------------------------------------- @@ -15,11 +15,14 @@ include $(top_builddir)/src/Makefile.global all: initdb initdb: initdb.sh $(top_builddir)/src/Makefile.global - sed -e 's/__MULTIBYTE__/$(MULTIBYTE)/g' \ - -e 's/__VERSION__/$(VERSION)/g' \ - -e 's:__bindir__:$(bindir):g' \ - -e 's:__datadir__:$(datadir):g' \ - < $< > $@ + rm -f $@ $@.tmp + sed -e 's/@MULTIBYTE@/$(MULTIBYTE)/g' \ + -e 's/@VERSION@/$(VERSION)/g' \ + -e 's,@bindir@,$(bindir),g' \ + -e 's,@datadir@,$(datadir),g' \ + $< >$@.tmp + chmod a+x $@.tmp + mv $@.tmp $@ install: all installdirs $(INSTALL_SCRIPT) initdb $(bindir)/initdb |
