From 35c090e6d78193b43c0491d367c43df67fdc9891 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Tue, 21 Aug 2012 17:23:26 -0400 Subject: [PATCH] Protect against installs with no locales Installs from source outside of tarballs may not have a built locale, which would result in a make error and an aborted install. Protect against that by checking for the existence of the locale install directory before trying to copy the files into place. In the weird case that Open-ILS/src/data/locale has been generated but there are no files in it, protect against erroring out via the judicious application of the - flag. Signed-off-by: Dan Scott Signed-off-by: Bill Erickson Conflicts: Open-ILS/src/Makefile.am Signed-off-by: Dan Scott --- Open-ILS/src/Makefile.am | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/Makefile.am b/Open-ILS/src/Makefile.am index 991d684eae..ac1cb24a1d 100644 --- a/Open-ILS/src/Makefile.am +++ b/Open-ILS/src/Makefile.am @@ -220,9 +220,11 @@ ilscore-install: @echo "Installing templates to $(DESTDIR)$(TEMPLATEDIR)" cp -r @srcdir@/templates/* $(DESTDIR)$(TEMPLATEDIR) cp -r @srcdir@/templates_* $(DESTDIR)$(CUSTOM_TEMPLATES) - $(MKDIR_P) $(DESTDIR)$(datadir)/locale/ - @echo "Installing template data files to $(datadir)/locale/" - cp @srcdir@/data/locale/* $(datadir)/locale/ + -@if test -d @srcdir@/data/locale; then \ + $(MKDIR_P) $(DESTDIR)$(datadir)/locale/ && \ + echo "Installing template data files to $(datadir)/locale/" && \ + cp @srcdir@/data/locale/* $(datadir)/locale/ ;\ + fi; $(MKDIR_P) $(DESTDIR)$(datadir)/overdue/ sed -i 's|LOCALSTATEDIR|@localstatedir@|g' '$(DESTDIR)@sysconfdir@/oils_sip.xml.example' sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@sysconfdir@/oils_sip.xml.example' -- 2.11.0