#!/bin/sh

set -e

#DEBHELPER#

if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] ; then
    update-alternatives --install /usr/bin/x-www-browser x-www-browser /usr/bin/wslview 30
    update-alternatives --install /usr/bin/www-browser www-browser /usr/bin/wslview 30
    date +"%s" | tee /usr/share/wslu/updated_time >/dev/null
fi

desktop-file-install --dir=/usr/share/applications /usr/share/wslu/wslview.desktop
update-desktop-database
