mirror of
https://github.com/erkin/ponysay.git
synced 2025-02-14 16:44:23 +01:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
998458131e
2 changed files with 10 additions and 9 deletions
10
Makefile
10
Makefile
|
@ -37,10 +37,12 @@ install: all
|
||||||
|
|
||||||
mkdir -p "$(DESTDIR)/usr/bin/"
|
mkdir -p "$(DESTDIR)/usr/bin/"
|
||||||
install "ponysay" "$(DESTDIR)/usr/bin/ponysay"
|
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"
|
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/"
|
mkdir -p "$(DESTDIR)/usr/share/bash-completion/completions/"
|
||||||
install "completion/bash-completion.sh" "$(DESTDIR)/usr/share/bash-completion/completions/ponysay"
|
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"
|
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/ponies"
|
||||||
rm -fr "$(DESTDIR)/usr/share/ponysay/ttyponies"
|
rm -fr "$(DESTDIR)/usr/share/ponysay/ttyponies"
|
||||||
unlink "$(DESTDIR)/usr/bin/ponysay"
|
unlink "$(DESTDIR)/usr/bin/ponysay"
|
||||||
unlink "$(DESTDIR)/usr/bin/ponysaylist.pl"
|
|
||||||
unlink "$(DESTDIR)/usr/bin/ponysaytruncater"
|
|
||||||
unlink "$(DESTDIR)/usr/bin/ponythink"
|
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/licenses/ponysay/COPYING"
|
||||||
unlink "$(DESTDIR)/usr/share/bash-completion/completions/ponysay"
|
unlink "$(DESTDIR)/usr/share/bash-completion/completions/ponysay"
|
||||||
unlink "$(DESTDIR)/usr/share/bash-completion/completions/ponythink"
|
unlink "$(DESTDIR)/usr/share/bash-completion/completions/ponythink"
|
||||||
|
|
9
ponysay
9
ponysay
|
@ -3,6 +3,7 @@
|
||||||
version=1.0
|
version=1.0
|
||||||
SYSTEMPONIES="/usr/share/ponysay/ponies"
|
SYSTEMPONIES="/usr/share/ponysay/ponies"
|
||||||
HOMEPONIES="${HOME}/.local/share/ponysay/ponies"
|
HOMEPONIES="${HOME}/.local/share/ponysay/ponies"
|
||||||
|
SCRIPTDIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Get bash script directory
|
||||||
pony="*"
|
pony="*"
|
||||||
wrap=""
|
wrap=""
|
||||||
|
|
||||||
|
@ -19,7 +20,8 @@ version() {
|
||||||
}
|
}
|
||||||
|
|
||||||
scrw=`(stty size <&2 || echo 0 0) | cut -d ' ' -f 2`
|
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
|
haspq=1
|
||||||
if [[ -f './pq4ps-list' ]]; then
|
if [[ -f './pq4ps-list' ]]; then
|
||||||
|
@ -190,10 +192,7 @@ say() {
|
||||||
cat
|
cat
|
||||||
else
|
else
|
||||||
WIDTH=`(stty size <&2 || echo 0 0) | cut -d ' ' -f 2`
|
WIDTH=`(stty size <&2 || echo 0 0) | cut -d ' ' -f 2`
|
||||||
ponysaytruncater $WIDTH 2>/dev/null ||
|
$truncatercmd $WIDTH 2>/dev/null || cat
|
||||||
${HOME}/.local/bin/ponysaytruncater $WIDTH 2>/dev/null ||
|
|
||||||
./ponysaytruncater $WIDTH 2>/dev/null ||
|
|
||||||
cat
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue