From 4d535806f199aec2bd0c904a4d6f02efd34aa248 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Sun, 21 Jun 2009 18:32:16 +1200 Subject: [PATCH] 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). --- errors/Makefile.am | 6 +++--- errors/alias-link.sh | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/errors/Makefile.am b/errors/Makefile.am index c5f4620fff..5b40087bc8 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: @@ -50,7 +50,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 ; dist-hook: translate for lang in $(TRANSLATIONS); do \ 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 -- 2.47.2