tests: update expect file for u_direct_io
[e2fsprogs.git] / debian / ss-dev.preinst
blob8da566ed4a8b672b2454a9a799da5c24705286c7
1 #!/bin/bash
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" = "install" -o "$1" = "upgrade" ] &&
19 [ -n "$2" ] && [ -h "$SYMLINK" ] &&
20 symlink_match "$SYMLINK" "$SYMLINK_TARGET"
21 then
22 mv -f "$SYMLINK" "${SYMLINK}.dpkg-backup"
25 #DEBHELPER#
27 exit 0