tests: update expect file for u_direct_io
[e2fsprogs.git] / debian / ss-dev.postrm
blobc625aae9ed64d620d3cdc92123c2e996afc1a0f2
1 #!/bin/sh
3 # Abort on error.
4 set -e
6 symlink_match()
8 local SYMLINK="$1"
9 local SYMLINK_TARGET="$2"
11 [ "$(readlink "$SYMLINK")" = "$SYMLINK_TARGET" ] || \
12 [ "$(readlink -f "$SYMLINK")" = "$SYMLINK_TARGET" ]
15 SYMLINK=/usr/share/doc/ss-dev
16 SYMLINK_TARGET=libss2
18 if [ "$1" = "purge" ] && [ -h "${SYMLINK}.dpkg-backup" ]
19 then
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"
25 then
26 echo "Restoring backup of $SYMLINK ..."
27 mv "${SYMLINK}.dpkg-backup" "$SYMLINK"
30 #DEBHELPER#
32 exit 0