]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix alias linker dist/install
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 21 Jun 2009 06:32:16 +0000 (18:32 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 21 Jun 2009 06:32:16 +0000 (18:32 +1200)
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
errors/alias-link.sh

index c5f4620fffc436748170d1dca363936a6143aa32..5b40087bc804fd1996e73c77172719ef26aaf08f 100644 (file)
@@ -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 \
index 043623c72c4724a99254191cd8feebd76a4a879c..10d1c21ca97b079a9041b1060b179139b82a7e40 100755 (executable)
@@ -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