• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2
3# Abort on error.
4set -e
5
6symlink_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
15SYMLINK=/usr/share/doc/ss-dev
16SYMLINK_TARGET=libss2
17
18if [ "$1" = "install" -o "$1" = "upgrade" ] &&
19   [ -n "$2" ] && [ -h "$SYMLINK" ] &&
20   symlink_match "$SYMLINK" "$SYMLINK_TARGET"
21then
22    mv -f "$SYMLINK" "${SYMLINK}.dpkg-backup"
23fi
24
25#DEBHELPER#
26
27exit 0
28