From cabffe4242962b7153afce87ca6a2581bc6cd20b Mon Sep 17 00:00:00 2001 From: Mattia Basaglia Date: Tue, 4 Aug 2015 17:33:57 +0200 Subject: [PATCH] Add a way to disable the pony --- systempony | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/systempony b/systempony index 94b35cf..270d2e9 100755 --- a/systempony +++ b/systempony @@ -278,11 +278,16 @@ do fi done -ponydir=$(get_data_file "rendered/ansi/") -ponyfile="$ponydir/$PONY.colored.txt" -if [ -n "$ponydir" -a '(' -z "$PONY" -o "$PONY" = random ')' ] +if [ "$PONY" = nopony ] then - ponyfile="$(find "$ponydir" -name '*.colored.txt' | shuf | head -n 1)" + ponyfile=/dev/null +else + ponydir=$(get_data_file "rendered/ansi/") + ponyfile="$ponydir/$PONY.colored.txt" + if [ -n "$ponydir" -a '(' \! -f "$ponyfile" -o "$PONY" = random ')' ] + then + ponyfile="$(find "$ponydir" -name '*.colored.txt' | shuf | head -n 1)" + fi fi