#!/bin/sh
# NASH.md §7.1, verbatim semantics (merged-usr symlink handling verified in nash M0).
set -e
if [ "$1" = "configure" ]; then
    dpkg-divert --package nash-default-shell --divert /usr/bin/bash.real --rename --add /bin/bash
    dpkg-divert --package nash-default-shell --divert /usr/bin/dash.real --rename --add /bin/dash
    ln -sf /usr/local/bin/nash /bin/bash
    ln -sf /usr/local/bin/nash /bin/dash
    ln -sf /usr/local/bin/nash /bin/sh
fi
