File: optcvt.sh

package info (click to toggle)
tcvt 0.1.20171010-1
  • links: PTS
  • area: main
  • in suites: buster, stretch
  • size: 84 kB
  • ctags: 122
  • sloc: python: 711; makefile: 20; sh: 12
file content (15 lines) | stat: -rwxr-xr-x 223 bytes parent folder | download | duplicates (3)
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