#!/bin/sh
# Clean revert: drop the nash links, un-divert the real shells, restore sh -> dash.
set -e
if [ "$1" = "remove" ]; then
    rm -f /bin/bash /bin/dash
    dpkg-divert --package nash-default-shell --rename --remove /bin/bash
    dpkg-divert --package nash-default-shell --rename --remove /bin/dash
    ln -sf dash /usr/bin/sh
fi
