(fix) added check for git installation

This commit is contained in:
jeirmeister 2024-12-10 05:40:40 -08:00
parent c3157a194f
commit 81b4a01188

View File

@ -7,6 +7,12 @@ if [ "$(id -u)" -ne 0 ]; then
exit 1 exit 1
fi fi
# Check if git is installed
if ! command -v git >/dev/null 2>&1; then
echo "Git not found. Installing git..."
apt-get update && apt-get install -y git
fi
# Install mode # Install mode
INSTALL_DIR="/usr/local/bin" INSTALL_DIR="/usr/local/bin"
REPO_DIR="/root/.nixos-utils" REPO_DIR="/root/.nixos-utils"