#!/bin/bash

# This short and stupid script is intended to be used 
# when minicom is called from a menu item under X.
# It guarantees the terminal window won't disappear immediately
# if minicom fails to start (but shows an informative message).
#
# We need the script not to quote and escape this command in a 
# cumbersome way in a menu entry, so that it is understood by any
# windowing environment.

/usr/bin/minicom "$@" \
|| { 
	echo $"To understand the reason of the problem, you may want to look at minicom(1) manpage or /usr/share/doc/minicom-*/" \
		| fold --spaces
	read -n 1 -s -p $"press almost any key to exit"
}
