]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix alias linker dist/install
authorAmos Jeffries <squid3@treenet.co.nz>
Wed, 24 Jun 2009 03:37:51 +0000 (15:37 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Wed, 24 Jun 2009 03:37:51 +0000 (15:37 +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 e93bbb9acefaaf172a11ac473b6cccfc6a3e4df5..9c513b65007f1de853f7f659381cb588e0df6804 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:
@@ -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:
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