From: Amos Jeffries Date: Thu, 24 Mar 2011 14:00:41 +0000 (+1300) Subject: Regression fix: upgrade existing icons X-Git-Tag: take06~27^2~71 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6588af447866bd6fd4d31b4c6e7297bd7fadc9b3;p=thirdparty%2Fsquid.git Regression fix: upgrade existing icons This adds an automatic upgrade to move the old pre-3.2.0.5 icons into the new icons area. This also retains any local customizations that may have been done, ie. new icons added outside Squid. --- diff --git a/src/Makefile.am b/src/Makefile.am index 7201d834d4..c95b39ca49 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -913,7 +913,19 @@ man_MANS = squid.8 EXTRA_DIST += squid.8.in CLEANFILES += squid.8 -install-data-local: install-sysconfDATA install-dataDATA +## check for existing Squid icons (used to be $datadir/icons). +## move them into the new icons location so we dont break anyones existing mime.conf +mimeconf-Upgrade-Shuffle: + @if test -d $(DESTDIR)$(datadir)/icons; then \ + mv $(DESTDIR)$(datadir)/icons/* $(DESTDIR)$(DEFAULT_ICON_DIR)/; \ + $(RM) -r $(DESTDIR)$(datadir)/icons; \ + echo "NOTICE: "; \ + echo "NOTICE: The Squid icons have been upgraded. Please update your $(DESTDIR)$(DEFAULT_MIME_TABLE)." ; \ + echo "NOTICE: $(DESTDIR)$(DEFAULT_MIME_TABLE).default contains the new icon configuration." ; \ + echo "NOTICE: "; \ + fi + +install-data-local: install-sysconfDATA install-dataDATA mimeconf-Upgrade-Shuffle @if test -f $(DESTDIR)$(DEFAULT_MIME_TABLE) ; then \ echo "$@ will not overwrite existing $(DESTDIR)$(DEFAULT_MIME_TABLE)" ; \ else \