#!/bin/sh -e # Periodically subversion's internal file system format changes. The change # necessitates a dump using an older version of svnadmin (a version that # understands the old filesystem format). Then a new svnadmin and the dumpfile # created by the old svnadmin can be used to create a repository in the new # format. # To facilitate users moving the repository from the old to the new format we # included a statically linked copy of svnadmin starting with version 0.15.0. OLD_VERSION="$2" case "$1" in upgrade) # before 0.15.0 we didn't create a static binary. if dpkg --compare-versions "$OLD_VERSION" ge 0.15.0 ; then if dpkg --compare-versions "$OLD_VERSION" lt 0.28.0 ; then # Remove any previously saved versions >>= 0.15.0 and << 0.28.0 # One might be left behind if the system has been upgraded # from << 0.28.0 to >> 0.28.0 more than once with different # OLD_VERSION's rm /usr/bin/svnadmin-0.1[5-9].[0-9]* > /dev/null 2>&1 || true rm /usr/bin/svnadmin-0.2[0-7].[0-9]* > /dev/null 2>&1 || true cp /usr/bin/svnadmin-static /usr/bin/svnadmin-$OLD_VERSION fi if dpkg --compare-versions "$OLD_VERSION" lt 0.35.1 ; then rm /usr/bin/svnadmin-0.3[0-3].[0-1]* > /dev/null 2>&1 || true cp /usr/bin/svnadmin-static /usr/bin/svnadmin-$OLD_VERSION fi fi ;; abort-upgrade|install) ;; *) echo "preinst called with unknown argument \`$1'" >&2 exit 1 ;; esac