#!/usr/bin/env bash

IFS=$'\n'

# Print logo
os=$(grep -E '\bNAME=' /etc/os-release | cut -d "=" -f2 | sed 's/"//g')
if [ -n "$(grep -i biglinux <<< $os)" ]; then
  os=biglinux
fi
os=${os,,}
eval "echo \"$(cat /usr/share/bigfetch/ascii/${os}.txt)\""

unset IFS

# Print Phrase
#Detect language of quote
echo
echo "Dica do Dia:"
if [ "$(grep LANG= /etc/locale.conf | grep pt)" != "" ]; then
  echo "$(/usr/bin/fortune bigfetch-ptbr)"
elif [ "$(grep LANG= /etc/locale.conf | grep es)" != "" ]; then
  echo "$(/usr/bin/fortune bigfetch-es)"
else
  echo "$(/usr/bin/fortune bigfetch-en)"
fi
echo
