ponysay/ttyponies.sh

12 lines
331 B
Bash
Raw Normal View History

#!/bin/bash
2012-07-14 23:15:58 +00:00
for pony in $(ls --color=no ponies/); do
echo "building ttypony: $pony"
if [[ `readlink "ponies/$pony"` = '' ]]; then
2012-07-14 23:15:58 +00:00
ponysay2ttyponysay < "ponies/$pony" | tty2colourfultty -c 1 -e > "ttyponies/$pony"
elif [[ ! -f "ttyponies/$pony" ]]; then
ln -s `readlink "ponies/$pony"` "ttyponies/$pony"
fi
done