mirror of
https://github.com/erkin/ponysay.git
synced 2024-11-29 23:48:00 +01:00
m
This commit is contained in:
parent
de1f27a73a
commit
c2a3c19c92
1 changed files with 0 additions and 30 deletions
30
ponysay.sh
30
ponysay.sh
|
@ -1,16 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
|
||||||
# Get bash script directory's parent
|
|
||||||
INSTALLDIR="$(dirname $( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd ))"
|
|
||||||
|
|
||||||
# Subscripts
|
|
||||||
truncatercmd="$INSTALLDIR/lib/ponysay/truncater"
|
|
||||||
|
|
||||||
pony="*" # Selected pony
|
|
||||||
wrap="" # Message wrap column
|
|
||||||
ponies=() # Selected ponies
|
|
||||||
|
|
||||||
scrw=`(stty size <&2 || echo 0 0) | cut -d ' ' -f 2` # Screen width
|
scrw=`(stty size <&2 || echo 0 0) | cut -d ' ' -f 2` # Screen width
|
||||||
scrh=`(stty size <&2 || echo 0 0) | cut -d ' ' -f 1` # Screen height
|
scrh=`(stty size <&2 || echo 0 0) | cut -d ' ' -f 1` # Screen height
|
||||||
|
|
||||||
|
@ -20,26 +10,6 @@ kmscmd=""
|
||||||
[ ! "$kmscmd" = "" ] && TERM="-linux-"
|
[ ! "$kmscmd" = "" ] && TERM="-linux-"
|
||||||
|
|
||||||
|
|
||||||
# Cowsay script
|
|
||||||
if [ ${0} == *ponythink ]; then
|
|
||||||
if [ "$PONYSAY_COWTHINK" = "" ]; then
|
|
||||||
cmd=cowthink
|
|
||||||
customcmd=0
|
|
||||||
else
|
|
||||||
cmd="$PONYSAY_COWTHINK"
|
|
||||||
customcmd=1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if [ "$PONYSAY_COWSAY" = "" ]; then
|
|
||||||
cmd=cowsay
|
|
||||||
customcmd=0
|
|
||||||
else
|
|
||||||
cmd="$PONYSAY_COWSAY"
|
|
||||||
customcmd=1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Function for printing the ponies and the message
|
# Function for printing the ponies and the message
|
||||||
say() {
|
say() {
|
||||||
# Set PONYSAY_SHELL_LINES to default if not specified
|
# Set PONYSAY_SHELL_LINES to default if not specified
|
||||||
|
|
Loading…
Reference in a new issue