aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--COPYING (renamed from LICENSE)2
-rw-r--r--README1
-rwxr-xr-xponythink26
3 files changed, 27 insertions, 2 deletions
diff --git a/LICENSE b/COPYING
index 459b463..6d08ceb 100644
--- a/LICENSE
+++ b/COPYING
@@ -10,4 +10,4 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
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. \ No newline at end of file
diff --git a/README b/README
index 6213c89..dfc66c6 100644
--- a/README
+++ b/README
@@ -2,4 +2,3 @@ I don't even know...
Author of the cows is unknown.
Depends on cowsay for obvious reasons.
-
diff --git a/ponythink b/ponythink
new file mode 100755
index 0000000..d43e84d
--- /dev/null
+++ b/ponythink
@@ -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 $*