From 53d94be203e541417fd9ae387ae3c64e476a4926 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 29 Jul 2005 12:06:12 +0000 Subject: [PATCH] Fix install-schema - move old schema dir out of the way, always install a fresh copy of everything. --- servers/slapd/Makefile.in | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/servers/slapd/Makefile.in b/servers/slapd/Makefile.in index 4fb79fd895..4301c4f7ab 100644 --- a/servers/slapd/Makefile.in +++ b/servers/slapd/Makefile.in @@ -401,23 +401,16 @@ all-cffiles: slapd $(SLAPD_DYNAMIC_BACKENDS) dynamic_overlays touch all-cffiles install-schema: FORCE - @-$(MKDIR) $(DESTDIR)$(schemadir) - i="$(srcdir)/schema/README" ; \ - SF=`basename $$i` ; \ - SD="$(DESTDIR)$(schemadir)/$$SF" ; \ - echo $(INSTALL) $(INSTALLFLAGS) -m 444 $$i $$SD ; \ - $(INSTALL) $(INSTALLFLAGS) -m 444 $$i $$SD - for i in $(srcdir)/schema/*.schema ; do \ - SF=`basename $$i` ; \ - SD="$(DESTDIR)$(schemadir)/$$SF" ; \ - if test ! -f $$SD ; then \ - echo "installing $$SF in $(schemadir)" ; \ - echo $(INSTALL) $(INSTALLFLAGS) -m 444 $$i $$SD ; \ - $(INSTALL) $(INSTALLFLAGS) -m 444 $$i $$SD ; \ - else \ - echo "PRESERVING EXISTING SCHEMA FILE $$SD" ; \ - fi ; \ - $(INSTALL) $(INSTALLFLAGS) -m 444 $$i $$SD.default ; \ + @if test -e $(DESTDIR)$(schemadir) ; then \ + echo "MOVING EXISTING SCHEMA DIR to $(DESTDIR)$(schemadir).$$$$" ; \ + mv $(DESTDIR)$(schemadir) $(DESTDIR)$(schemadir).$$$$ ; \ + fi + $(MKDIR) $(DESTDIR)$(schemadir) + @SD=$(DESTDIR)$(schemadir) ; \ + files=`cd $(srcdir)/schema ; echo README *.schema` ; \ + for i in $$files ; do \ + echo $(INSTALL) $(INSTALLFLAGS) -m 444 schema/$$i $$SD/$$i ; \ + $(INSTALL) $(INSTALLFLAGS) -m 444 $(srcdir)/schema/$$i $$SD/$$i ; \ done install-conf: FORCE -- 2.39.5