9 local SYMLINK_TARGET
="$2"
11 [ "$(readlink "$SYMLINK")" = "$SYMLINK_TARGET" ] || \
12 [ "$(readlink -f "$SYMLINK")" = "$SYMLINK_TARGET" ]
15 SYMLINK
=/usr
/share
/doc
/ss-dev
18 if [ "$1" = "purge" ] && [ -h "${SYMLINK}.dpkg-backup" ]
20 rm -f "${SYMLINK}.dpkg-backup"
22 if [ "$1" = "abort-install" -o "$1" = "abort-upgrade" ] &&
23 [ -n "$2" ] && [ ! -e "$SYMLINK" ] && [ -h "${SYMLINK}.dpkg-backup" ] &&
24 symlink_match
"${SYMLINK}.dpkg-backup" "$SYMLINK_TARGET"
26 echo "Restoring backup of $SYMLINK ..."
27 mv "${SYMLINK}.dpkg-backup" "$SYMLINK"