diff --git a/basic-instalations.sh b/basic-instalations.sh index e8c4185..7fbf4e3 100755 --- a/basic-instalations.sh +++ b/basic-instalations.sh @@ -9,9 +9,22 @@ is_wsl() { grep -qi microsoft /proc/version 2>/dev/null } +check_git_installed() { + if ! command -v git &> /dev/null; then + echo "🔍 Git not found, installing..." + sudo apt-get update + sudo apt-get install -y git + echo "✅ Git installed successfully!" + else + echo "✔️ Git is already installed: $(git --version)" + fi +} + install_docker_linux() { echo "🔧 Installing Docker on Linux..." + check_git_installed + # Remove old versions sudo apt-get remove -y docker docker-engine docker.io containerd runc || true