#!/bin/bash
set -e

if [ -z "$YESNO" ]; then
	YESNO=$"yYnN"
fi

cat <<EOF
I can automatically include various information about your cross building
configuration and debug output in your bug report. This information may help
to diagnose your problem.

EOF

if [ -f "$HOME/.dpkg-cross/cross-compile" ]; then
	yesno "May I include $HOME/.dpkg-cross/cross-compile ? [Y/n] " yep
	if [ "$REPLY" = "yep" ]; then
		echo >&3
		echo "-- $HOME/.dpkg-cross/cross-compile --" >&3
		echo >&3
		cat $config >&3
	else
		echo >&3
		echo "-- ( $HOME/.dpkg-cross/cross-compile present, but not submitted) --" >&3
		echo >&3
	fi
fi

yesno "May I include /etc/dpkg-cross/cross-compile ? [Y/n] " yep
if [ "$REPLY" = "yep" ]; then
	echo >&3
	echo "-- /etc/dpkg-cross/cross-compile --" >&3
	echo >&3
	cat /etc/dpkg-cross/cross-compile >&3
else
	echo >&3
	echo "-- (/etc/dpkg-cross/cross-compile not submitted) --" >&3
	echo >&3
fi
