first commit
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
# PC-Unlocker ISO bauen -- einziger Hostbedarf: Docker.
|
||||
#
|
||||
# ./build.sh baut Image und ISO -> ./out/pc-unlocker.iso
|
||||
# ./build.sh --no-cache erzwingt Neubau des Docker-Images
|
||||
#
|
||||
set -euo pipefail
|
||||
|
||||
HERE="$(cd "$(dirname "$0")" && pwd)"
|
||||
IMAGE="pc-unlocker-builder"
|
||||
OUT="$HERE/out"
|
||||
|
||||
CACHE=""
|
||||
[ "${1:-}" = "--no-cache" ] && CACHE="--no-cache"
|
||||
|
||||
if ! command -v docker >/dev/null 2>&1; then
|
||||
echo "Fehler: Docker ist nicht installiert." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "==> Docker-Build-Image erstellen"
|
||||
docker build $CACHE -t "$IMAGE" -f "$HERE/build/Dockerfile" "$HERE"
|
||||
|
||||
mkdir -p "$OUT"
|
||||
|
||||
echo "==> ISO im Container bauen (benoetigt --privileged fuer loop/mount)"
|
||||
docker run --rm \
|
||||
--privileged \
|
||||
-v "$OUT:/output" \
|
||||
"$IMAGE"
|
||||
|
||||
echo
|
||||
echo "Fertig. ISO liegt unter: $OUT/pc-unlocker.iso"
|
||||
echo "Auf einen USB-Stick schreiben z.B. mit:"
|
||||
echo " sudo dd if=$OUT/pc-unlocker.iso of=/dev/sdX bs=4M status=progress conv=fsync"
|
||||
Reference in New Issue
Block a user