diff --git a/scripts/startup.sh b/scripts/startup.sh index 9fe88a9..50aa0a1 100755 --- a/scripts/startup.sh +++ b/scripts/startup.sh @@ -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