aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile10
-rwxr-xr-xponysay8
2 files changed, 9 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 37883a6..c1ed92e 100644
--- a/Makefile
+++ b/Makefile
@@ -37,10 +37,12 @@ install: all
mkdir -p "$(DESTDIR)/usr/bin/"
install "ponysay" "$(DESTDIR)/usr/bin/ponysay"
- install -s "ponysaytruncater" "$(DESTDIR)/usr/bin/ponysaytruncater"
- install "ponysaylist.pl" "$(DESTDIR)/usr/bin/ponysaylist.pl"
ln -sf "ponysay" "$(DESTDIR)/usr/bin/ponythink"
+ mkdir -p "$(DESTDIR)/usr/lib/ponysay/"
+ install -s "ponysaytruncater" "$(DESTDIR)/usr/lib/ponysay/truncater"
+ install "ponysaylist.pl" "$(DESTDIR)/usr/lib/ponysay/list.pl"
+
mkdir -p "$(DESTDIR)/usr/share/bash-completion/completions/"
install "completion/bash-completion.sh" "$(DESTDIR)/usr/share/bash-completion/completions/ponysay"
install "completion/bash-completion-think.sh" "$(DESTDIR)/usr/share/bash-completion/completions/ponythink"
@@ -87,9 +89,9 @@ uninstall:
rm -fr "$(DESTDIR)/usr/share/ponysay/ponies"
rm -fr "$(DESTDIR)/usr/share/ponysay/ttyponies"
unlink "$(DESTDIR)/usr/bin/ponysay"
- unlink "$(DESTDIR)/usr/bin/ponysaylist.pl"
- unlink "$(DESTDIR)/usr/bin/ponysaytruncater"
unlink "$(DESTDIR)/usr/bin/ponythink"
+ unlink "$(DESTDIR)/usr/lib/ponysay/list.pl"
+ unlink "$(DESTDIR)/usr/lib/ponysay/truncater"
unlink "$(DESTDIR)/usr/share/licenses/ponysay/COPYING"
unlink "$(DESTDIR)/usr/share/bash-completion/completions/ponysay"
unlink "$(DESTDIR)/usr/share/bash-completion/completions/ponythink"
diff --git a/ponysay b/ponysay
index 1bb76c1..1034456 100755
--- a/ponysay
+++ b/ponysay
@@ -19,7 +19,8 @@ version() {
}
scrw=`(stty size <&2 || echo 0 0) | cut -d ' ' -f 2`
-listcmd="ponysaylist.pl"
+listcmd="/usr/lib/ponysay/list.pl"
+truncatercmd="/usr/lib/ponysay/truncater"
haspq=1
if [[ -f './pq4ps-list' ]]; then
@@ -190,10 +191,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
}