From af081d264334ea5bf335eec70a2ee2f276b822da Mon Sep 17 00:00:00 2001 From: Erkin Batu Altunbaş Date: Sun, 26 Feb 2012 17:43:26 +0100 Subject: I don't even know. --- LICENSE | 13 +++++++++++++ README | 3 +++ ponysay | 26 ++++++++++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 LICENSE create mode 100755 ponysay diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..e13b1a9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,13 @@ + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2012 + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + 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. diff --git a/README b/README index 6a914a6..03091ad 100644 --- a/README +++ b/README @@ -1,3 +1,6 @@ +I don't even know... + Author of the cows is unknown. Depends on cowsay for obvious reasons. Not even finished. +Put "ponies" to /usr/share or /usr/local/share diff --git a/ponysay b/ponysay new file mode 100755 index 0000000..2514001 --- /dev/null +++ b/ponysay @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +PERL_UNICODE=S +ponydir=/usr/share/ponies +lponydir=/usr/local/share/ponies +function ponyf() { + if [[ -f ${ponydir}/${1}.cow ]] ; then + cowsay -f "${ponydir}/${1}.cow" $@ + elif [[ -f ${lponydir}/${1}.cow ]] ; then + cowsay -f "${lponydir}/${1}.cow" $@ + else + ponyr + fi +} +function ponyr() { + cowsay -f $(ls /usr/share/ponies/*.cow | sort -R | head -n1) $@ +} + +while getopts f:h:v: OPT +do + case ${OPT} in + v) echo "v0.01" ;; + h) echo "helpherpderp" ;; + f) ponyf $* ;; + *) ponyr $* ;; + esac +done -- cgit