Random systempony

This commit is contained in:
Mattia Basaglia 2014-12-23 15:50:56 +01:00
parent 879fc140e8
commit 2adbe67b18

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
PONY=fluttershy PONY=random
INFO=( User Hostname Distro Kernel Uptime Shell Packages RAM Disk ) INFO=( User Hostname Distro Kernel Uptime Shell Packages RAM Disk )
function ponyget_Shell() function ponyget_Shell()
@ -226,6 +226,10 @@ done
ponydir=$(get_data_file "rendered/ansi/") ponydir=$(get_data_file "rendered/ansi/")
ponyfile="$ponydir/$PONY.colored.txt" 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 # WARNING most of the variable names below this point are pretty bad and should be refactored