Add check to prevent user from trying to install if AllPac already exists
This commit is contained in:
parent
0f41bb28ea
commit
6fcf36f068
|
@ -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"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user