Fix build-iso.sh: Modell aus Hostname ableiten statt aus late-commands
This commit is contained in:
parent
fffed90735
commit
6f48c7fc3b
1 changed files with 4 additions and 3 deletions
|
|
@ -20,10 +20,11 @@ echo " macbook-setup ISO Builder ($OS)"
|
|||
echo "════════════════════════════════════════════"
|
||||
|
||||
# ── Modell aus user-data erkennen ──────────────────────────────────────────
|
||||
MODEL=$(grep -o 'setup-base.sh | bash -s -- [0-9]*' "$SCRIPT_DIR/user-data" | grep -o '[0-9]*$')
|
||||
HOSTNAME=$(grep 'hostname:' "$SCRIPT_DIR/user-data" | awk '{print $2}')
|
||||
if [[ -z "$MODEL" ]]; then
|
||||
err "Konnte Modell nicht aus user-data ermitteln"
|
||||
# Modell aus Hostname ableiten: m13 → 13, m16 → 16
|
||||
MODEL=$(echo "$HOSTNAME" | grep -o '[0-9]*')
|
||||
if [[ -z "$MODEL" || -z "$HOSTNAME" ]]; then
|
||||
err "Konnte Modell/Hostname nicht aus user-data ermitteln (hostname: m13 oder m16)"
|
||||
fi
|
||||
ok "Modell: MBP $MODEL\" (Hostname: $HOSTNAME)"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue