From 6fcf36f06859a0db6d066bf94135e4e0da858700 Mon Sep 17 00:00:00 2001 From: VetheonGames Date: Mon, 8 Jan 2024 16:29:51 -0700 Subject: [PATCH] Add check to prevent user from trying to install if AllPac already exists --- allpac/install.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/allpac/install.sh b/allpac/install.sh index 4f5cd8a..1bf98f8 100644 --- a/allpac/install.sh +++ b/allpac/install.sh @@ -1,5 +1,12 @@ #!/bin/bash +# Check if the ~/.allpac directory already exists +if [ -d "$HOME/.allpac" ]; then + echo "The AllPac directory ~/.allpac already exists." + echo "Please remove or rename this directory before attempting to install AllPac again." + exit 1 +fi + mkdir -p "$HOME/.allpac/cache" "$HOME/.allpac/logs" "$HOME/.allpac/bin" echo "We are about to write a new pkg.list"