From: Adam Dickmeiss Date: Tue, 6 May 2014 11:54:03 +0000 (+0200) Subject: Remove already present XSL files from /etc/pazpar2 X-Git-Tag: v1.7.0~7 X-Git-Url: http://git.indexdata.com/?p=pazpar2-moved-to-github.git;a=commitdiff_plain;h=8cffdac106e6e103aeda6a21d48b328c46c58418 Remove already present XSL files from /etc/pazpar2 If files are identical they can be safely removed because the new version is in /usr/share/pazpar2/xsl --- diff --git a/debian/pazpar2.postinst b/debian/pazpar2.postinst index 7bf566b..c5862f4 100644 --- a/debian/pazpar2.postinst +++ b/debian/pazpar2.postinst @@ -9,6 +9,14 @@ no_services=true for f in /etc/pazpar2/services-enabled/*.xml; do test -e $f && no_services=false done +for f in /usr/share/pazpar2/xsl/*.xsl; do + e=/etc/pazpar2/`basename $f` + if test -f $e; then + if diff $e $f >/dev/null; then + rm $e + fi + fi +done if ${no_services}; then ln -sf ../services-available/default.xml \ /etc/pazpar2/services-enabled/default.xml diff --git a/pazpar2.spec b/pazpar2.spec index 93f3fe5..5bf759e 100644 --- a/pazpar2.spec +++ b/pazpar2.spec @@ -26,6 +26,14 @@ Group: Data Requires: pazpar2 %post +for f in /usr/share/pazpar2/xsl/*.xsl; do + e=/etc/pazpar2/`basename $f` + if test -f $e; then + if diff $e $f >/dev/null; then + rm $e + fi + fi +done if [ $1 = 1 ]; then /sbin/chkconfig --add pazpar2 /sbin/service pazpar2 start > /dev/null 2>&1