mirror of
https://github.com/erkin/ponysay.git
synced 2025-02-17 01:54:22 +01:00
make file update
This commit is contained in:
parent
ce3fac588f
commit
578c5b24a8
2 changed files with 25 additions and 5 deletions
10
Makefile
10
Makefile
|
@ -40,11 +40,6 @@ install-min: truncater
|
|||
|
||||
mkdir -p "$(INSTALLDIR)/lib/ponysay/"
|
||||
install -s "truncater" "$(INSTALLDIR)/lib/ponysay/truncater"
|
||||
install "list.pl" "$(INSTALLDIR)/lib/ponysay/list.pl"
|
||||
install "linklist.pl" "$(INSTALLDIR)/lib/ponysay/linklist.pl"
|
||||
install "pq4ps" "$(INSTALLDIR)/lib/ponysay/pq4ps"
|
||||
install "pq4ps.pl" "$(INSTALLDIR)/lib/ponysay/pq4ps.pl"
|
||||
install "pq4ps-list.pl" "$(INSTALLDIR)/lib/ponysay/pq4ps-list.pl"
|
||||
|
||||
mkdir -p "$(INSTALLDIR)/share/licenses/ponysay/"
|
||||
install "COPYING" "$(INSTALLDIR)/share/licenses/ponysay/COPYING"
|
||||
|
@ -129,7 +124,12 @@ uninstall-old:
|
|||
if [ -d "$(INSTALLDIR)/share/ponies" ]; then rm -fr "$(INSTALLDIR)/share/ponies" ; fi
|
||||
if [ -d "$(INSTALLDIR)/share/ttyponies" ]; then rm -fr "$(INSTALLDIR)/share/ttyponies" ; fi
|
||||
if [ -f "$(INSTALLDIR)/bin/ponysaytruncater" ]; then unlink "$(INSTALLDIR)/bin/ponysaytruncater" ; fi
|
||||
if [ -d "$(INSTALLDIR)/lib/ponysay/link.pl" ]; then unlink "$(INSTALLDIR)/lib/ponysay/link.pl" ; fi
|
||||
if [ -d "$(INSTALLDIR)/lib/ponysay/linklist.pl" ]; then unlink "$(INSTALLDIR)/lib/ponysay/linklist.pl" ; fi
|
||||
if [ -d "$(INSTALLDIR)/lib/ponysay/pq4ps" ]; then unlink "$(INSTALLDIR)/lib/ponysay/pq4ps" ; fi
|
||||
if [ -d "$(INSTALLDIR)/lib/ponysay/pq4ps.pl" ]; then unlink "$(INSTALLDIR)/lib/ponysay/pq4ps.pl" ; fi
|
||||
if [ -d "$(INSTALLDIR)/lib/ponysay/pq4ps-list" ]; then unlink "$(INSTALLDIR)/lib/ponysay/pq4ps-list" ; fi
|
||||
if [ -d "$(INSTALLDIR)/lib/ponysay/pq4ps-list.pl" ]; then unlink "$(INSTALLDIR)/lib/ponysay/pq4ps-list.pl" ; fi
|
||||
|
||||
clean:
|
||||
if [ -f "truncater" ]; then rm -f "truncater" ; fi
|
||||
|
|
20
ponysay
Executable file
20
ponysay
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
INSTALLDIR="$(dirname $( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd ))"
|
||||
truncatercmd="$INSTALLDIR/lib/ponysay/truncater"
|
||||
|
||||
scrw=`(stty size <&2 || echo 0 0) | cut -d ' ' -f 2` # Screen width
|
||||
|
||||
function wtrunc {
|
||||
if [ "$PONYSAY_FULL_WIDTH" = 'yes' ] || [ "$PONYSAY_FULL_WIDTH" = 'y' ] || [ "$PONYSAY_FULL_WIDTH" = '1' ]; then
|
||||
cat
|
||||
else
|
||||
if [[ -f $truncatercmd ]]; then
|
||||
$truncatercmd $scrw
|
||||
else
|
||||
cat
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
"$0.py" "$@" | wtrunc
|
Loading…
Reference in a new issue