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"