#!/usr/bin/env bash # Pengu - Persistent Linux environment in a container # Copyright (c) 2025, Iwan van der Kleijn | MIT License # https://github.com/soyrochus/pengu set -euo pipefail # Defaults REPO="soyrochus/pengu" REF="refs/heads/main" # use the path you confirmed works DEST="." YES=0 usage() { cat <&2; usage; exit 1 ;; esac done mkdir -p "$DEST" BASE="https://raw.githubusercontent.com/${REPO}/${REF}" fetch() { local src="$1" dst="$2" if [[ -e "$dst" && "$YES" -ne 1 ]]; then read -rp "File '$dst' exists. Overwrite? [y/N] " a [[ "$a" =~ ^([yY]|yes)$ ]] || { echo "Skipping $dst"; return; } fi echo "Fetching $src …" curl -fsSL "$BASE/$src" -o "$dst" } mkdir -p "${DEST%/}/.pengu" # Download Pengufile (default profile) and Bash helper fetch "Dockerfile" "${DEST%/}/.pengu/Pengufile" fetch "pengu" "${DEST%/}/pengu" # Make helper executable chmod +x "${DEST%/}/pengu" || true echo echo "🐧 Pengu installed in: $DEST" echo "Next steps:" echo " ./pengu up" echo " ./pengu shell" echo