mirror of
https://github.com/erkin/ponysay.git
synced 2025-02-07 13:36:43 +01:00
Merged
This commit is contained in:
commit
2ee2c38c7a
3 changed files with 27 additions and 2 deletions
|
@ -10,4 +10,4 @@
|
||||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
0. You just DO WHAT THE FUCK YOU WANT TO.
|
0. You just DO WHAT THE FUCK YOU WANT TO.
|
1
README
1
README
|
@ -2,4 +2,3 @@ I don't even know...
|
||||||
|
|
||||||
Author of the cows is unknown.
|
Author of the cows is unknown.
|
||||||
Depends on cowsay for obvious reasons.
|
Depends on cowsay for obvious reasons.
|
||||||
|
|
||||||
|
|
26
ponythink
Executable file
26
ponythink
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
export PERL_UNICODE=S
|
||||||
|
ponydir=/usr/share/ponies
|
||||||
|
|
||||||
|
function ponyf() {
|
||||||
|
if [[ -f ${ponydir}/${1}.cow ]] ; then
|
||||||
|
cowthink -f "${ponydir}/${1}.cow" $@
|
||||||
|
else
|
||||||
|
ponyr $@
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
function ponyr() {
|
||||||
|
cowthink -f $(ls ${ponydir}/*.cow | sort -R | head -n1) $@
|
||||||
|
}
|
||||||
|
|
||||||
|
while getopts f:hv OPT
|
||||||
|
do
|
||||||
|
case ${OPT} in
|
||||||
|
v) echo "v0.01" ; exit;;
|
||||||
|
h) echo "helpherpderp" ; exit;;
|
||||||
|
f) ponyf $* ; exit;;
|
||||||
|
\?) echo "DERP"; exit;;
|
||||||
|
*) ponyr $* ; exit;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
ponyr $*
|
Loading…
Reference in a new issue