aboutsummaryrefslogtreecommitdiff
path: root/ponysay
diff options
context:
space:
mode:
authorErkin Batu Altunbaş <erkinbatu@gmail.com>2012-02-26 19:47:19 +0100
committerErkin Batu Altunbaş <erkinbatu@gmail.com>2012-02-26 19:47:19 +0100
commit7d9bec0d23700ef8c20a5f3342431e4aa2ad01d2 (patch)
tree26cab0fbbaa1c85efd47e8591d8108180cc91436 /ponysay
parentf7a7a59d11f0c5b2ae745b710520bc8da85738e7 (diff)
downloadponysay-7d9bec0d23700ef8c20a5f3342431e4aa2ad01d2.tar.gz
ponysay-7d9bec0d23700ef8c20a5f3342431e4aa2ad01d2.tar.bz2
ponysay-7d9bec0d23700ef8c20a5f3342431e4aa2ad01d2.zip
.cow -> .pony
Diffstat (limited to 'ponysay')
-rwxr-xr-xponysay20
1 files changed, 10 insertions, 10 deletions
diff --git a/ponysay b/ponysay
index ddaf7d0..1c3567d 100755
--- a/ponysay
+++ b/ponysay
@@ -8,27 +8,27 @@ cmd=cowsay
[[ ${0} == *ponythink ]] && cmd=cowthink
function ponyf() {
- if [[ -f ${HOMEDIR}/${1}.cow ]]; then
- ${cmd} -f "${HOMEDIR}/${1}.cow" $@
- elif [[ -f ${PONYDIR}/${1}.cow ]]; then
- ${cmd} -f "${PONYDIR}/${1}.cow" $@
+ if [[ -f ${HOMEDIR}/${1}.pony ]]; then
+ ${cmd} -f "${HOMEDIR}/${1}.pony" $@
+ elif [[ -f ${PONYDIR}/${1}.pony ]]; then
+ ${cmd} -f "${PONYDIR}/${1}.pony" $@
else
ponyr $@
fi
}
function ponyr() {
- if [[ -d ${HOMEDIR} ]] && [[ -n $(find ${HOMEDIR} -name \*.cow) ]]; then
- ${cmd} -f $(ls ${HOMEDIR}/*.cow | sort -R | head -n1) $@
- elif [[ -d ${PONYDIR} ]] && [[ -n $(find ${PONYDIR} -name \*.cow) ]]; then
- ${cmd} -f $(ls ${PONYDIR}/*.cow | sort -R | head -n1) $@
+ if [[ -d ${HOMEDIR} ]] && [[ -n $(find ${HOMEDIR} -name \*.pony) ]]; then
+ ${cmd} -f $(ls ${HOMEDIR}/*.pony | sort -R | head -n1) $@
+ elif [[ -d ${PONYDIR} ]] && [[ -n $(find ${PONYDIR} -name \*.pony) ]]; then
+ ${cmd} -f $(ls ${PONYDIR}/*.pony | sort -R | head -n1) $@
fi
}
while getopts f:hv OPT
do
case ${OPT} in
- v) echo "v0.1" ; exit;;
- h) echo "helpherpderp" ; exit;;
+ v) echo "ponysay v0.2" ; exit;;
+ h) echo "-v for version, -h for this, -f to specify a cowfile. It'll choose a random cowfile if no argument is given." ; exit;;
f) ponyf $* ; exit;;
\?) echo "DERP"; exit;;
*) ponyr $* ; exit;;