diff --git a/extras/lightweight-ponies/COPYING b/extras/lightweight-ponies/COPYING new file mode 100644 index 00000000..662cfe1d --- /dev/null +++ b/extras/lightweight-ponies/COPYING @@ -0,0 +1,4 @@ +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without any warranty. diff --git a/extras/lightweight-ponies/README b/extras/lightweight-ponies/README new file mode 100644 index 00000000..abf4f93b --- /dev/null +++ b/extras/lightweight-ponies/README @@ -0,0 +1,8 @@ +A script that prints a random pony without +any features at all provided by ponysay. + +This script is intended to provide the +ponysay ponies for computers that are +not powerful enought to run ponysay without +taking too long. + diff --git a/extras/lightweight-ponies/lightweight-ponies b/extras/lightweight-ponies/lightweight-ponies new file mode 100755 index 00000000..b1bce827 --- /dev/null +++ b/extras/lightweight-ponies/lightweight-ponies @@ -0,0 +1,9 @@ +#!/bin/sh + +dir="/usr/share/ponysay/ttyponies" +if [ -n "${DISPLAY}" ]; then + dir="/usr/share/ponysay/ponies" +fi + +find "${dir}" | grep '\.pony$' | shuf | head -n 1 | xargs cat | sed -e ':a;N;$!ba;s:\$[^$]*\$::g' +