#!/bin/sh
# switch to shell in case of failure
#  https://wiki.debian.org/M68k/Cowbuilder#Use_a_hook_to_drop_into_a_shell_upon_build_failure

echo
echo Build failed. Trying to invoke a shell.
echo
# optionally comment out the next two lines, will give you a dash instead
apt-get -y --force-yes install less mksh mc
ENV=/etc/skel/.mkshrc /bin/mksh -l 0<>/dev/tty >&0 2>&0 || \
    /bin/sh 0<>/dev/tty >&0 2>&0
EOF

