background checks 2

This commit is contained in:
farhan 2022-02-28 15:44:35 +00:00
parent 7f88b3bcda
commit 719273b4c3
1 changed files with 17 additions and 0 deletions

View File

@ -34,8 +34,25 @@ docker_check() {
fi
}
arch_check() {
if [[ ! -e /etc/arch-release ]]; then
echo -ne "ERROR! This script must be run in Arch Linux!\n"
exit 0
fi
}
pacman_check() {
if [[ -f /var/lib/pacman/db.lck ]]; then
echo "ERROR! Pacman is blocked."
echo -ne "If not running remove /var/lib/pacman/db.lck.\n"
exit 0
fi
}
background_checks() {
root_check
arch_check
pacman_check
docker_check
}
# Renders a text based list of options that can be selected by the