1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
#!/bin/sh
set -e
##
## Functions to replace a symlink with a directory
## Backported from jessie's version of dpkg-maintscript-helper
##
symlink_to_dir() {
local SYMLINK="$1"
local SYMLINK_TARGET="$2"
local LASTVERSION="$3"
local PACKAGE="$4"
# Skip remaining parameters up to --
while [ "$1" != "--" -a $# -gt 0 ]; do shift; done
shift
# We cannot bail depending on the version, as here we only
# know what was the last configured version, and we might
# have been unpacked, then upgraded with an unpack and thus
# never been configured before.
if [ "$1" = "configure" ] && [ -h "${SYMLINK}.dpkg-backup" ] &&
symlink_match "${SYMLINK}.dpkg-backup" "$SYMLINK_TARGET"
then
rm -f "${SYMLINK}.dpkg-backup"
fi
}
symlink_match()
{
local SYMLINK="$1"
local SYMLINK_TARGET="$2"
[ "$(readlink $SYMLINK)" = "$SYMLINK_TARGET" ] || \
[ "$(readlink -f $SYMLINK)" = "$SYMLINK_TARGET" ]
}
#DEBHELPER#
symlink_to_dir \
/usr/share/doc/libglobus-openssl-module-doc \
libglobus-openssl-module-dev 4.6-2~ \
libglobus-openssl-module-doc -- "$@"
|