Created
August 4, 2016 15:02
-
-
Save fpytloun/f640e18258af39192ca0853c30a4f31f to your computer and use it in GitHub Desktop.
pbuilder hook to access shell on FTBFS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# example file to be used with --hookdir | |
# | |
# invoke shell if build fails. | |
echo "=== BUILD FAILED" | |
read -r -p "=== Do you want to enter shell and investigate situation? (Y/n) " res < /dev/tty > /dev/tty 2> /dev/tty | |
if [[ ${res,,} =~ ^(yes|y|)$ ]]; then | |
BUILDDIR="${BUILDDIR:-/tmp/buildd}" | |
apt-get install -y "${APTGETOPT[@]}" vim-nox less | |
cd "$BUILDDIR"/*/debian/.. | |
/bin/bash < /dev/tty > /dev/tty 2> /dev/tty | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment