Check for stdin and args

This commit is contained in:
Kyah Rindlisbacher 2012-05-08 18:04:26 +10:00
parent 3ed997195b
commit 40c0f58ca8

View file

@ -45,6 +45,12 @@ Options:
EOF EOF
} }
# if no stdin and no argumrnts then print usage and exit
if [[ -t 0 && $# == 0 ]]; then
usage
exit
fi
say() { say() {
# Ponies use UTF-8 drawing characters. Prevent a Perl warning. # Ponies use UTF-8 drawing characters. Prevent a Perl warning.
export PERL_UNICODE=S export PERL_UNICODE=S