aboutsummaryrefslogtreecommitdiff
path: root/ponythink
diff options
context:
space:
mode:
Diffstat (limited to 'ponythink')
-rwxr-xr-xponythink26
1 files changed, 26 insertions, 0 deletions
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 $*