From 586695bc3116f981dcf457447a0d4e86215f1141 Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 16 Jun 2025 19:05:43 +0200 Subject: [PATCH] wip --- blackarch.sh | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/blackarch.sh b/blackarch.sh index 21832cd..53f6f3d 100644 --- a/blackarch.sh +++ b/blackarch.sh @@ -50,6 +50,23 @@ fi } + check-blackarch() { + spin "Checking for blackarch existence.." + + local refresh="$(${_sudo} pacman -Syy)" + + if grep -qi "blackarch" <<<"$refresh"; then + upclear + throw "You already have blackarch-repos on your system!" + pen bold red "Exiting now!" + exit 69 + else + upclear + check "Found no blackarch repos.." + return 0 + fi + } + setup-blackarch() { local tmpfile out err local baURL=https://blackarch.org/strap.sh @@ -96,7 +113,9 @@ pkg-install curl fi - setup-blackarch && post-setup + if check-blackarch; then + setup-blackarch && post-setup + fi } if setup-env; then