From f7526e7eff76204bff4b4e6e37507311bf01002f Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 23 Feb 2026 05:27:27 -0600 Subject: chore: standardize shebangs, fix lint target, add .editorconfig - Change all script shebangs to #!/usr/bin/env bash for portability (heredocs writing to installed systems keep #!/bin/bash) - Remove || true from Makefile lint target so shellcheck errors fail the build - Add .editorconfig for consistent formatting across editors --- .editorconfig | 23 +++++++++++++++++++++++ Makefile | 2 +- build.sh | 2 +- custom/archangel | 2 +- custom/install-claude | 2 +- scripts/boot-vm.sh | 2 +- scripts/build-release | 2 +- scripts/full-test.sh | 2 +- scripts/sanity-test.sh | 2 +- scripts/test-install.sh | 2 +- scripts/test-vm.sh | 2 +- 11 files changed, 33 insertions(+), 10 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..acd3686 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,23 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +charset = utf-8 + +[*.sh] +indent_style = space +indent_size = 4 + +[Makefile] +indent_style = tab + +[*.conf] +indent_style = space +indent_size = 4 + +[*.org] +indent_style = space +indent_size = 2 +trim_trailing_whitespace = false diff --git a/Makefile b/Makefile index 2a8fcfe..97be28d 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ all: lint build # Lint all bash scripts lint: @echo "==> Running shellcheck..." - @shellcheck -x build.sh scripts/*.sh custom/archangel custom/zfsrollback custom/zfssnapshot custom/lib/*.sh || true + @shellcheck -x build.sh scripts/*.sh custom/archangel custom/zfsrollback custom/zfssnapshot custom/lib/*.sh @echo "==> Shellcheck complete" # Build the ISO (requires sudo) diff --git a/build.sh b/build.sh index f17ee62..a169cae 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # build.sh - Build the custom Arch ZFS installation ISO # Must be run as root # diff --git a/custom/archangel b/custom/archangel index 430bc4a..4bb19d9 100755 --- a/custom/archangel +++ b/custom/archangel @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # archangel - Arch Linux Installer with Snapshot-Based Recovery # Craig Jennings # diff --git a/custom/install-claude b/custom/install-claude index e467108..f312861 100755 --- a/custom/install-claude +++ b/custom/install-claude @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # install-claude - Install Claude Code CLI # Run this if you need AI assistance during installation diff --git a/scripts/boot-vm.sh b/scripts/boot-vm.sh index 6eb8eea..99686e3 100755 --- a/scripts/boot-vm.sh +++ b/scripts/boot-vm.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # boot-vm.sh - Boot the VM from disk if installed, otherwise from ISO # # This is a simple wrapper that does the right thing: diff --git a/scripts/build-release b/scripts/build-release index bdd6711..035c4fe 100755 --- a/scripts/build-release +++ b/scripts/build-release @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # build-release - Build and distribute the archangel ISO # # Usage: diff --git a/scripts/full-test.sh b/scripts/full-test.sh index fe164d1..7728859 100755 --- a/scripts/full-test.sh +++ b/scripts/full-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # full-test.sh - Comprehensive installation testing for archangel ISO # # Runs automated installation tests for all disk configurations: diff --git a/scripts/sanity-test.sh b/scripts/sanity-test.sh index 9248da1..1973ee6 100755 --- a/scripts/sanity-test.sh +++ b/scripts/sanity-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # sanity-test.sh - Automated sanity test for archangel ISO # # Boots the ISO in a headless QEMU VM, waits for SSH, runs verification diff --git a/scripts/test-install.sh b/scripts/test-install.sh index 9240c12..4f9f0d8 100755 --- a/scripts/test-install.sh +++ b/scripts/test-install.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # test-install.sh - Automated installation testing for archangel # # Runs unattended installs in VMs using test config files. diff --git a/scripts/test-vm.sh b/scripts/test-vm.sh index f2a4a00..2f93bd2 100755 --- a/scripts/test-vm.sh +++ b/scripts/test-vm.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # test-vm.sh - Test the archangel ISO in a QEMU virtual machine # # Usage: -- cgit v1.2.3