diff options
author | Mattias Andrée <maandree@operamail.com> | 2012-08-19 23:56:18 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2012-08-19 23:56:18 +0200 |
commit | 7f1e5535b32324cdbe4b9d1d997f6c237a172807 (patch) | |
tree | d451db6da3f29ed38abf45a31cb2f91cb1b34616 /ponysay | |
parent | ee4f95db90b037730dd608a80fb31e37926aaa0a (diff) | |
download | ponysay-7f1e5535b32324cdbe4b9d1d997f6c237a172807.tar.gz ponysay-7f1e5535b32324cdbe4b9d1d997f6c237a172807.tar.bz2 ponysay-7f1e5535b32324cdbe4b9d1d997f6c237a172807.zip |
misc
Diffstat (limited to 'ponysay')
-rwxr-xr-x | ponysay | 23 |
1 files changed, 1 insertions, 22 deletions
@@ -1,25 +1,4 @@ #!/usr/bin/env bash -INSTALLDIR="$(dirname $( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd ))" -LIBDIR="$INSTALLDIR/lib/ponysay" - -# The truncater executable -truncatercmd="$LIBDIR/truncater" - -# Screen width -scrw=`(stty size <&2 || echo 0 0) | cut -d ' ' -f 2` - -# Output trunction on width -function wtrunc { - if [[ "$PONYSAY_FULL_WIDTH" = 'yes' ]] || [[ "$PONYSAY_FULL_WIDTH" = 'y' ]] || [[ "$PONYSAY_FULL_WIDTH" = '1' ]] || [[ ! -f $truncatercmd ]]; then - cat - else - $truncatercmd $scrw - fi -} - -# Ponies use UTF-8 drawing characters. Prevent a Perl warning. -export PERL_UNICODE=S - # Run ponysay -"$0.py" "$@" | wtrunc +"$0.py" "$@" |