aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErkin Batu Altunbaş <erkinbatu@gmail.com>2012-03-11 23:04:18 +0100
committerErkin Batu Altunbaş <erkinbatu@gmail.com>2012-03-11 23:04:18 +0100
commitd4e4715cae4ee9f4ad7a79667cca12e88e98b06b (patch)
tree5fec8b32ffbd88cb08fbd0d23c575c94beeaae2e
parent6fd482e773c40fc7c4f5cc45779e9933eb59a7e6 (diff)
downloadponysay-d4e4715cae4ee9f4ad7a79667cca12e88e98b06b.tar.gz
ponysay-d4e4715cae4ee9f4ad7a79667cca12e88e98b06b.tar.bz2
ponysay-d4e4715cae4ee9f4ad7a79667cca12e88e98b06b.zip
added to check if cowsay exists, also readme
-rw-r--r--README.md6
-rwxr-xr-xponysay14
2 files changed, 16 insertions, 4 deletions
diff --git a/README.md b/README.md
index d8bf876..6531f9b 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,9 @@
ponysay - A cowsay wrapper with ponies.
-These are desktop ponies converted using https://github.com/ducttape/ducttape-editor/wiki
+The original author of the cowfiles is unknown.
+(But we are told that the artist is known as "Rossy". If you are the artist, we'd appreciate if you contact us before you sue us.)
+
+These are desktop ponies converted using [ducttape](https://github.com/ducttape/ducttape-editor/wiki)
+
![Derp](http://i.imgur.com/xOJbE.png)
[](/derp "Today your terminal, tomorrow the world!")
diff --git a/ponysay b/ponysay
index 179a491..739ab30 100755
--- a/ponysay
+++ b/ponysay
@@ -1,11 +1,20 @@
#!/usr/bin/env bash
-version=0.4
+version=0.5
SYSTEMPONIES=/usr/share/ponies
HOMEPONIES="${HOME}/.ponies"
pony="*"
wrap=
+if [[ -f `which cowsay` ]];
+then continue;
+else
+ echo "You don't seem to have the cowsay program."
+ echo "Please install it in order to use this wrapper."
+ echo -n "(Or symlink it to 'cowsay' in anywhere in \$path "
+ echo "if it actually exists under a different filename."
+fi
+
cmd=cowsay
[[ ${0} == *ponythink ]] && cmd=cowthink
@@ -15,8 +24,7 @@ version() {
usage() {
version
- echo
- echo "Usage:"
+ echo -e "\nUsage:"
echo "${0##*/} [options] [message]"
echo
echo "If [message] is not provided, reads the message from STDIN"