From 6588af447866bd6fd4d31b4c6e7297bd7fadc9b3 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Fri, 25 Mar 2011 03:00:41 +1300 Subject: [PATCH] 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. --- src/Makefile.am | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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 \ -- 2.47.2