Add check to prevent user from trying to install if AllPac already exists

This commit is contained in:
VetheonGames 2024-01-08 16:29:51 -07:00
parent 0f41bb28ea
commit 6fcf36f068

View File

@ -1,5 +1,12 @@
#!/bin/bash #!/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" mkdir -p "$HOME/.allpac/cache" "$HOME/.allpac/logs" "$HOME/.allpac/bin"
echo "We are about to write a new pkg.list" echo "We are about to write a new pkg.list"