From 7f1e5535b32324cdbe4b9d1d997f6c237a172807 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 19 Aug 2012 23:56:18 +0200 Subject: misc --- ponysay | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'ponysay') diff --git a/ponysay b/ponysay index 545144e..d7f3811 100755 --- a/ponysay +++ b/ponysay @@ -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" "$@" -- cgit