Added linting and package resolution Gitea Actions workflows.
Audit / Package Resolution (push) Successful in 1m6s
CI / Linting (push) Successful in 4s

This commit is contained in:
2026-04-29 16:03:33 -04:00
parent c868ec5107
commit 6441b0114d
14 changed files with 156 additions and 44 deletions
+10 -8
View File
@@ -28,9 +28,6 @@ readonly COLOR_CYAN='\033[0;36m'
readonly COLOR_BG_GRAY='\033[48;5;236m'
readonly COLOR_RESET='\033[0m'
# Current installation phase (set by set_phase)
CURRENT_PHASE=""
# Step counter for progress indicator
CURRENT_STEP=0
TOTAL_STEPS=10
@@ -117,7 +114,6 @@ run_visible_cmd_in_chroot() {
print_step() {
local step="$1"
CURRENT_STEP=$((CURRENT_STEP + 1))
CURRENT_PHASE="$step"
echo ""
echo -e "${COLOR_BLUE}=== [${CURRENT_STEP}/${TOTAL_STEPS}] ${step} ===${COLOR_RESET}"
}
@@ -243,11 +239,16 @@ prompt_password() {
# Arguments:
# $1 - menu title
# $@ - menu options (remaining arguments)
# Arguments:
# $1 - variable name to store the selected option number
# $2 - menu title
# Returns:
# Selected option number in MENU_SELECTION variable
# Selected option number in the provided variable
prompt_menu() {
local title="$1"
shift
local var_name="$1"
local title="$2"
local selection
shift 2
local options=("$@")
local i=1
@@ -257,7 +258,8 @@ prompt_menu() {
((i++))
done
read -r MENU_SELECTION
read -r selection
printf -v "$var_name" '%s' "$selection"
}
# Wait for user to press enter
+1 -1
View File
@@ -111,7 +111,7 @@ retry() {
log_cmd "$@"
local attempt=1
while [ $attempt -le $max_attempts ]; do
while [ "$attempt" -le "$max_attempts" ]; do
if "$@"; then
return 0
fi
+4 -2
View File
@@ -21,9 +21,11 @@
# Prompt user for graphics driver selection and install
prompt_install_graphics() {
prompt_menu "Would you like to install graphics drivers?" "Intel" "NVIDIA" "Skip"
local selection
case "$MENU_SELECTION" in
prompt_menu selection "Would you like to install graphics drivers?" "Intel" "NVIDIA" "Skip"
case "$selection" in
1)
print "Installing Intel graphics drivers..."
chroot_pacman_install "${INTEL_PACKAGES[@]}"
+1
View File
@@ -167,6 +167,7 @@ format_and_mount_filesystems() {
local storage_mode="$2"
# Format EFI partition(s)
# shellcheck disable=SC2153
format_efi_partition "$EFI_PARTITION"
if [ "$storage_mode" = "raid1" ]; then
format_efi_partition "$EFI_PARTITION_2"
+2 -2
View File
@@ -76,10 +76,10 @@ install_microcode() {
case "$vendor" in
"intel")
chroot_pacman_install intel-ucode
chroot_pacman_install "${INTEL_MICROCODE_PACKAGES[@]}"
;;
"amd")
chroot_pacman_install amd-ucode
chroot_pacman_install "${AMD_MICROCODE_PACKAGES[@]}"
;;
*)
print_warning "Unknown CPU vendor: ${vendor}. Please install microcode manually after installation, if available."
+2
View File
@@ -83,8 +83,10 @@ create_boot_entry() {
local storage_mode="$1"
if [ "$storage_mode" = "raid1" ]; then
# shellcheck disable=SC2153
create_boot_entry_raid1 "$LUKS_UUID" "$LUKS_UUID_2"
elif [ "$storage_mode" = "raid1-3disk" ]; then
# shellcheck disable=SC2153
create_boot_entry_raid1_3disk "$LUKS_UUID" "$LUKS_UUID_2" "$LUKS_UUID_3"
else
create_boot_entry_single "$LUKS_UUID"
+1 -1
View File
@@ -65,7 +65,7 @@ enable_resolved() {
prompt_install_wifi() {
if confirm "Would you like to install iwd for Wi-Fi support?"; then
print "Installing iwd..."
chroot_pacman_install iwd
chroot_pacman_install "${WIFI_PACKAGES[@]}"
chroot_systemd_enable iwd.service
fi
}
+7 -30
View File
@@ -44,28 +44,6 @@ list_profiles() {
done
}
# Get packages for a profile
# Arguments:
# $1 - profile key
# Outputs:
# Package list to stdout
get_profile_packages() {
local profile_key="$1"
local pkg_var="PROFILE_${profile_key}_PACKAGES[@]"
echo "${!pkg_var}"
}
# Get services for a profile
# Arguments:
# $1 - profile key
# Outputs:
# Service list to stdout
get_profile_services() {
local profile_key="$1"
local svc_var="PROFILE_${profile_key}_SERVICES[@]"
echo "${!svc_var}"
}
# Check if profile requires KDE
# Arguments:
# $1 - profile key
@@ -95,8 +73,10 @@ validate_profile_selection() {
install_profile() {
local profile_key="$1"
local username="$2"
local packages
local services
local pkg_var="PROFILE_${profile_key}_PACKAGES[@]"
local svc_var="PROFILE_${profile_key}_SERVICES[@]"
local packages=("${!pkg_var}")
local services=("${!svc_var}")
# Install KDE if required
if profile_requires_kde "$profile_key"; then
@@ -105,10 +85,8 @@ install_profile() {
fi
# Get and install profile packages
packages=$(get_profile_packages "$profile_key")
if [ -n "$packages" ]; then
# shellcheck disable=SC2086
chroot_pacman_install $packages
if [ "${#packages[@]}" -gt 0 ]; then
chroot_pacman_install "${packages[@]}"
fi
# Add user to wireshark group if wireshark was installed
@@ -117,8 +95,7 @@ install_profile() {
fi
# Enable profile services
services=$(get_profile_services "$profile_key")
for service in $services; do
for service in "${services[@]}"; do
chroot_systemd_enable "$service"
done
}
+2
View File
@@ -25,6 +25,7 @@ prompt_username() {
while true; do
prompt "Please enter the username you'd like to use for your account:" USERNAME
# shellcheck disable=SC2153
if validate_username "$USERNAME"; then
return 0
fi
@@ -85,6 +86,7 @@ set_user_password() {
setup_user() {
prompt_username
prompt_display_name
# shellcheck disable=SC2153
create_user "$USERNAME" "$DISPLAY_NAME"
set_user_password "$USERNAME"
}