From 2adbe67b189a95ae115056856c4a5beb5c130771 Mon Sep 17 00:00:00 2001 From: Mattia Basaglia Date: Tue, 23 Dec 2014 15:50:56 +0100 Subject: [PATCH] Random systempony --- systempony | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/systempony b/systempony index 4b4f11d..121ad61 100755 --- a/systempony +++ b/systempony @@ -1,6 +1,6 @@ #!/bin/bash -PONY=fluttershy +PONY=random INFO=( User Hostname Distro Kernel Uptime Shell Packages RAM Disk ) function ponyget_Shell() @@ -226,6 +226,10 @@ done ponydir=$(get_data_file "rendered/ansi/") ponyfile="$ponydir/$PONY.colored.txt" +if [ -n "$ponydir" -a '(' -z "$PONY" -o "$PONY" = random ')' ] +then + ponyfile="$(find rendered/ansi/ -name '*.colored.txt' | shuf | head -n 1)" +fi # WARNING most of the variable names below this point are pretty bad and should be refactored