chore(installer): shellcheck-clean the archiso answerfile flow
shellcheck passes (default severity) on the base installer and the whole answerfile chain: generate-answerfile.sh → build.sh → .automated_script.sh → launch.sh → arch-autoinstall.sh → tui-install.sh. Verified the generator's JSON schema (drive, kernel, keymap, hostname, username, encrypt, fido2_root, fido2_user, run_tui, components, desktop_environment, apps, shell_rc, colors) parses correctly through both the auto base installer (af_get/af_bool) and the TUI installer (load_answerfile), for full and minimal/empty answerfiles. Fixed the three legitimate findings surfaced along the way: - generate-answerfile.sh: drop unused AVAIL_DRIVES (SC2034); the drive list is rendered inline in the dialog prompt. - tui-install.sh: drop unused C_RULE (SC2034); write log truncation as ': > "$LOG"' so the redirection has an explicit command (SC2188). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>main
parent
db4079d543
commit
fb617185df
|
|
@ -101,8 +101,8 @@ dialog --backtitle "$BACKTITLE" \
|
|||
# ═══════════════════════════════════════════════════════════════
|
||||
|
||||
# ── Drive ─────────────────────────────────────────────────────────────────────
|
||||
AVAIL_DRIVES=$(lsblk -dn -o NAME,SIZE,MODEL 2>/dev/null | awk '{printf "%s \"%s %s\" off ", $1, $2, $3}' || true)
|
||||
|
||||
# The available-drives list is rendered inline in the inputbox prompt below via
|
||||
# lsblk, so no separate variable is needed here.
|
||||
AF_DRIVE=$(dialog --backtitle "$BACKTITLE" \
|
||||
--title " Target Drive " \
|
||||
--inputbox "\n Enter the install drive (e.g. /dev/sda, /dev/nvme0n1).\n\n Available drives:\n$(lsblk -dn -o NAME,SIZE,MODEL 2>/dev/null | sed 's/^/ /')\n" \
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ ANSWERFILE_MODE=false
|
|||
# tput is not used here because it may be unavailable on a minimal TTY.
|
||||
C_RESET=$'\033[0m'
|
||||
C_TITLE=$'\033[1;35m' # bold magenta — section headers
|
||||
C_RULE=$'\033[35m' # magenta — separators
|
||||
C_ACCENT=$'\033[36m' # cyan — prompts and selected marks
|
||||
C_BOLD=$'\033[1m'
|
||||
C_DIM=$'\033[2m'
|
||||
|
|
@ -461,7 +460,8 @@ fi
|
|||
|
||||
# Truncate the log file now that preflight passed; all prior output was to stdout.
|
||||
# Entries appended from this point on are the authoritative install log.
|
||||
> "$LOG"
|
||||
# ':' is the no-op command so the redirection has an explicit target.
|
||||
: > "$LOG"
|
||||
printf "Dotfiles install: %s\nDotfiles dir: %s\n" "$(date)" "$DOTFILES_DIR" >> "$LOG"
|
||||
|
||||
# ── Welcome ───────────────────────────────────────────────────────────────────
|
||||
|
|
|
|||
Loading…
Reference in New Issue