From: Amos Jeffries Date: Wed, 24 Jun 2009 03:37:51 +0000 (+1200) Subject: Fix alias linker dist/install X-Git-Tag: SQUID_3_1_0_9~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=347da17c673be3b63e35601dd66795aeb8a42db6;p=thirdparty%2Fsquid.git Fix alias linker dist/install make requires ';' after a SHELL command apparently. Make alias-link.sh handle case where the DESTDIR is non-existent. This occurs on some distro packaging systems (ie using langpack as a separate package may not install errors). --- diff --git a/errors/Makefile.am b/errors/Makefile.am index e93bbb9ace..9c513b6500 100644 --- a/errors/Makefile.am +++ b/errors/Makefile.am @@ -30,8 +30,8 @@ install-data-local: else \ echo "$(INSTALL_DATA) $(srcdir)/errorpage.css $(DESTDIR)$(DEFAULT_STYLESHEET)"; \ $(INSTALL_DATA) $(srcdir)/errorpage.css $(DESTDIR)$(DEFAULT_STYLESHEET); \ - fi \ - $(SHELL) $(srcdir)/alias-link.sh "$(LN)" "$(RM)" "$(DESTDIR)$(DEFAULT_ERROR_DIR)" "$(srcdir)/aliases" || exit 1 + fi ; \ + $(SHELL) $(srcdir)/alias-link.sh "$(LN)" "$(RM)" "$(DESTDIR)$(DEFAULT_ERROR_DIR)" "$(srcdir)/aliases" || exit 1 ; uninstall-local: @@ -49,7 +49,7 @@ uninstall-local: ## Upgrade requires the new files to be pre-installed upgrade: install - $(SHELL) $(srcdir)/alias-link.sh "$(LN)" "$(RM)" "$(DESTDIR)$(DEFAULT_ERROR_DIR)" "$(srcdir)/alias-upgrade" || exit 1 + $(SHELL) $(srcdir)/alias-link.sh "$(LN)" "$(RM)" "$(DESTDIR)$(DEFAULT_ERROR_DIR)" "$(srcdir)/alias-upgrade" || exit 1 ; # undocumented hack. You can use this target to create multi-lingual # error pages. For example: diff --git a/errors/alias-link.sh b/errors/alias-link.sh index 043623c72c..10d1c21ca9 100755 --- a/errors/alias-link.sh +++ b/errors/alias-link.sh @@ -5,7 +5,6 @@ # # This file creates the authoritative ISO aliases. # -# INPUT: "$(LN)" "$(RM)" "$(DESTDIR)$(DEFAULT_ERROR_DIR)" "$(srcdir)/$@" LN="${1}" RM="${2}" @@ -17,6 +16,11 @@ if ! test -f ${ALIASFILE} ; then exit 1 fi +if ! test -d ${DIR} ; then + echo "WARNING: Destination directory does not exist. Nothing to do." + exit 0 +fi + # Parse the alias file cat ${ALIASFILE} | while read base aliases; do