#!/bin/sh
#
# Copyright 2024 The Chromium Authors and Alex313031
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

set -e

action="$1"
if [ "$2" = "in-favour" ]; then
  # Treat conflict remove as an upgrade.
  action="upgrade"
fi
# Don't clean-up just for an upgrade.`
if [ "$action" = "upgrade" ] ; then
  exit 0
fi

@@include@@../common/prerm.include

# Remove from the alternatives system
update-alternatives --remove x-www-browser /usr/bin/@@USR_BIN_SYMLINK_NAME@@
update-alternatives --remove gnome-www-browser /usr/bin/@@USR_BIN_SYMLINK_NAME@@

# End
