MIAOU-BASH is a collection of scripts and configurations designed to enhance your terminal experience. As the name suggests, it is built on Bash and is designed to work on most modern GNU/Linux systems.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.1 KiB

# CONSTANTS
# FUNCTIONS
function bash_version {
bash --version | head -n1 | cut -d ' ' -f4 | grep -oE '[0-9]+\.[0-9]+\.[0-9]+'
}
function distribution {
grep ^ID= /etc/os-release | cut -d= -f2
}
function debian_version {
grep ^VERSION= /etc/os-release | cut -d= -f2
}
function doctor_distribution {
echo --distribution--
fetch_distro_like
echo "DISTRO FAMILY = $DISTRO_LIKE"
distro_name=$(distribution)
echo "DISTRO NAME = $distro_name"
if [[ $distro_name == 'debian' ]]; then
echo "DISTRO VERSION= $(debian_version)"
fi
}
function doctor_miaou {
echo --miaou--
echo "MIAOU_BASH_DIR = $MIAOU_BASH_DIR"
fetch_mode
echo "MIAOU_BASH_MODE = $MIAOU_BASH_MODE"
echo "MIAOU_BASH_MODE_OWNER = $MIAOU_BASH_MODE_OWNER"
}
function doctor_console {
echo --console--
echo "BASH_VERSION = $(bash_version)"
echo "LANG = ${LANG:-}"
echo "TERM = ${TERM:-}"
}
function doctor_tests {
echo --tests--
"$MIAOU_BASH_DIR"/test/miaou-bash.test.bash 2>&1
}
# MAIN
source "$MIAOU_BASH_DIR"/lib/functions.bash
echo == MIAOU DOCTOR ==
doctor_distribution
doctor_console
doctor_miaou
doctor_tests