mirror of
https://github.com/erkin/ponysay.git
synced 2024-11-21 20:18:00 +01:00
add lightweight-ponies
Signed-off-by: Mattias Andrée <maandree@operamail.com>
This commit is contained in:
parent
ab4606758a
commit
e0971487a3
3 changed files with 21 additions and 0 deletions
4
extras/lightweight-ponies/COPYING
Normal file
4
extras/lightweight-ponies/COPYING
Normal file
|
@ -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.
|
8
extras/lightweight-ponies/README
Normal file
8
extras/lightweight-ponies/README
Normal file
|
@ -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.
|
||||
|
9
extras/lightweight-ponies/lightweight-ponies
Executable file
9
extras/lightweight-ponies/lightweight-ponies
Executable file
|
@ -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'
|
||||
|
Loading…
Reference in a new issue