runtests.sh: handle SIGINT
authorZac Medico <zmedico@gentoo.org>
Sun, 21 Nov 2010 03:22:33 +0000 (19:22 -0800)
committerZac Medico <zmedico@gentoo.org>
Wed, 24 Nov 2010 02:07:37 +0000 (18:07 -0800)
runtests.sh

index c228dce56cdf775133dab137e6fc02dc88ce88d1..dc3343fe9b7ec1d00a8630f30bcc0e2831575f45 100755 (executable)
@@ -15,6 +15,13 @@ case "${NOCOLOR:-false}" in
                ;;
 esac
 
+interrupted() {
+       echo "interrupted." >&2
+       exit 1
+}
+
+trap interrupted SIGINT
+
 exit_status="0"
 for version in ${PYTHON_VERSIONS}; do
        if [[ -x /usr/bin/python${version} ]]; then