include machine env

This commit is contained in:
JOLIMAITRE Matthieu 2024-06-18 04:31:35 +02:00
parent 328d9f67eb
commit bba062df50
2 changed files with 2 additions and 1 deletions

16
data/home/.machine_env Normal file
View file

@ -0,0 +1,16 @@
#!/bin/sh
# seeding rng
RANDOM="2$(hostname | sum | cut -f 1 -d ' ')"
# rng function
function random_from {
declare -a array=("$@")
r=$((RANDOM % ${#array[@]}))
printf "%s\n" "${array[$r]}"
}
# generated variables
export MACHINE_COLOR=$(random_from 1 2 3 4 5 6 7 8 9 10 11 12 13 14)