| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
# Abort on error. |
| 4 |
set -e |
| 5 |
|
| 6 |
symlink_match() |
| 7 |
{ |
| 8 |
local SYMLINK="$1" |
| 9 |
local SYMLINK_TARGET="$2" |
| 10 |
|
| 11 |
[ "$(readlink "$SYMLINK")" = "$SYMLINK_TARGET" ] || \ |
| 12 |
[ "$(readlink -f "$SYMLINK")" = "$SYMLINK_TARGET" ] |
| 13 |
} |
| 14 |
|
| 15 |
SYMLINK=/usr/share/doc/comerr-dev |
| 16 |
SYMLINK_TARGET=libcomerr2 |
| 17 |
SYMLINK_TARGET2=libcom-err2 |
| 18 |
|
| 19 |
if [ "$1" = "configure" ] && [ -h "${SYMLINK}.dpkg-backup" ] |
| 20 |
then |
| 21 |
if symlink_match "${SYMLINK}.dpkg-backup" "$SYMLINK_TARGET" || |
| 22 |
symlink_match "${SYMLINK}.dpkg-backup" "$SYMLINK_TARGET2" |
| 23 |
then |
| 24 |
rm -f "${SYMLINK}.dpkg-backup" |
| 25 |
fi |
| 26 |
fi |
| 27 |
|
| 28 |
#DEBHELPER# |
| 29 |
|
| 30 |
exit 0 |