aboutsummaryrefslogtreecommitdiff
path: root/ponysay
diff options
context:
space:
mode:
authorPablo Lezaeta <prflr88@gmail.com>2012-07-18 15:24:42 -0400
committerPablo Lezaeta <prflr88@gmail.com>2012-07-18 15:24:42 -0400
commit998458131e5f5c59072558feb8d8b5c9fe137390 (patch)
tree40275baa49c9ffe929bb2fcedb3d7d0bc38bc867 /ponysay
parentcfcdab07877770055a10ab5fcb165c24e6c5dfbe (diff)
parent3c53e1fb10298d4ebb969fe2ae42909538467c91 (diff)
downloadponysay-998458131e5f5c59072558feb8d8b5c9fe137390.tar.gz
ponysay-998458131e5f5c59072558feb8d8b5c9fe137390.tar.bz2
ponysay-998458131e5f5c59072558feb8d8b5c9fe137390.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'ponysay')
-rwxr-xr-xponysay9
1 files changed, 4 insertions, 5 deletions
diff --git a/ponysay b/ponysay
index 1bb76c1..d7fb068 100755
--- a/ponysay
+++ b/ponysay
@@ -3,6 +3,7 @@
version=1.0
SYSTEMPONIES="/usr/share/ponysay/ponies"
HOMEPONIES="${HOME}/.local/share/ponysay/ponies"
+SCRIPTDIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Get bash script directory
pony="*"
wrap=""
@@ -19,7 +20,8 @@ version() {
}
scrw=`(stty size <&2 || echo 0 0) | cut -d ' ' -f 2`
-listcmd="ponysaylist.pl"
+listcmd="${SCRIPTDIR}/../lib/ponysay/list.pl"
+truncatercmd="${SCRIPTDIR}/../lib/ponysay/truncater"
haspq=1
if [[ -f './pq4ps-list' ]]; then
@@ -190,10 +192,7 @@ say() {
cat
else
WIDTH=`(stty size <&2 || echo 0 0) | cut -d ' ' -f 2`
- ponysaytruncater $WIDTH 2>/dev/null ||
- ${HOME}/.local/bin/ponysaytruncater $WIDTH 2>/dev/null ||
- ./ponysaytruncater $WIDTH 2>/dev/null ||
- cat
+ $truncatercmd $WIDTH 2>/dev/null || cat
fi
}