summaryrefslogtreecommitdiff
path: root/optcvt.sh
blob: b73c0950280017c809eb8960512fa627dcfa343d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
TCVT=./tcvt.py
MINWIDTH=80

SIZE=`stty size`
test $? = 0 || exit $?
COLUMNS="${SIZE#* }"

if test "$COLUMNS" -ge $((2*$MINWIDTH+1)); then
	exec $TCVT "$@"
elif test -z "$@"; then
	exec "$SHELL"
else
	exec "$@"
fi