Add auto-install for missing prerequisites
- New lib/prereqs.sh: detects distro (Arch, Debian/Ubuntu, RHEL/Fedora, openSUSE) and installs git + podman/docker if missing - Podman preferred over docker; user chooses if neither present - Docker install also enables systemd service and adds user to docker group - README updated: prereqs table now shows auto-install support Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
8d089c05a2
commit
452a603cdf
3 changed files with 154 additions and 20 deletions
16
wizard.sh
16
wizard.sh
|
|
@ -7,25 +7,11 @@ set -euo pipefail
|
|||
WIZARD_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
source "$WIZARD_DIR/lib/utils.sh"
|
||||
source "$WIZARD_DIR/lib/prereqs.sh"
|
||||
source "$WIZARD_DIR/lib/core.sh"
|
||||
source "$WIZARD_DIR/lib/project.sh"
|
||||
source "$WIZARD_DIR/lib/workflow.sh"
|
||||
|
||||
# ── Prerequisites ──────────────────────────────────────────────────────────
|
||||
check_prerequisites() {
|
||||
header "Checking Prerequisites"
|
||||
require_cmd git
|
||||
if command -v docker &>/dev/null; then
|
||||
CONTAINER_CMD="docker"
|
||||
elif command -v podman &>/dev/null; then
|
||||
CONTAINER_CMD="podman"
|
||||
else
|
||||
die "Neither docker nor podman found. Install one to use devcontainers."
|
||||
fi
|
||||
success "git: $(git --version)"
|
||||
success "$CONTAINER_CMD: $($CONTAINER_CMD --version | head -1)"
|
||||
}
|
||||
|
||||
# ── Project info ───────────────────────────────────────────────────────────
|
||||
collect_project_info() {
|
||||
header "Project Details"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue