#!/bin/sh

# seeding rng
RANDOM="7$(hostname | sum | cut -f 1 -d ' ')"


# rng function
function random_from {
  declare -a array=("$@")
  r=$((RANDOM % ${#array[@]}))
  printf "%s\n" "${array[$r]}"
}


# generated variables
mb_colors=$(random_from 1:9 2:10 3:11 4:12 5:13 6:14 9:1 10:2 11:3 12:4 13:5 14:6)
export MACHINE_COLOR=$(echo $mb_colors | cut -d ':' -f 1)
export MACHINE_COLOR_ALT=$(echo $mb_colors | cut -d ':' -f 2)
