Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/linux-workstation-bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ readonly LWBS_ROOT="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
source "$LWBS_ROOT/lib/bootstrap.sh"

# Pass all CLI arguments to the application entry point.
bootstrap_main "$@"
bootstrap_main "$@"
72 changes: 36 additions & 36 deletions config/defaults.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ declare -ar LWBS_SUPPORTED_DISTROS=(

# Human-readable names for supported distribution profiles.
declare -Ar LWBS_DISTRO_DISPLAY_NAMES=(
[ubuntu]="Ubuntu"
[debian]="Debian"
[kali]="Kali Linux"
["ubuntu"]="Ubuntu"
["debian"]="Debian"
["kali"]="Kali Linux"
)

# Default distribution selection behaviour.
Expand All @@ -53,46 +53,46 @@ readonly LWBS_CONFIG_FILE_NAME="config.conf"
# Additional distributions may be detected even when they do not yet
# have an installation profile supported by the application.
declare -Ar LWBS_DISTRO_FAMILIES=(
[ubuntu]="debian"
[debian]="debian"
[kali]="debian"
[linuxmint]="debian"
[pop]="debian"
[elementary]="debian"

[fedora]="rpm"
[rhel]="rpm"
[rocky]="rpm"
[almalinux]="rpm"
[centos]="rpm"

[arch]="arch"
[manjaro]="arch"
[endeavouros]="arch"

[opensuse-leap]="suse"
[opensuse-tumbleweed]="suse"
[sles]="suse"
["ubuntu"]="debian"
["debian"]="debian"
["kali"]="debian"
["linuxmint"]="debian"
["pop"]="debian"
["elementary"]="debian"

["fedora"]="rpm"
["rhel"]="rpm"
["rocky"]="rpm"
["almalinux"]="rpm"
["centos"]="rpm"

["arch"]="arch"
["manjaro"]="arch"
["endeavouros"]="arch"

["opensuse-leap"]="suse"
["opensuse-tumbleweed"]="suse"
["sles"]="suse"
)

# Default package manager for each distribution family.
declare -Ar LWBS_FAMILY_PACKAGE_MANAGERS=(
[debian]="apt"
[rpm]="dnf"
[arch]="pacman"
[suse]="zypper"
["debian"]="apt"
["rpm"]="dnf"
["arch"]="pacman"
["suse"]="zypper"
)

# Normalize common architecture names used by Linux distributions.
declare -Ar LWBS_ARCH_ALIASES=(
[x86_64]="amd64"
[aarch64]="arm64"
[arm64]="arm64"
[armv7l]="armhf"
[i386]="i386"
[i486]="i386"
[i586]="i386"
[i686]="i386"
["x86_64"]="amd64"
["aarch64"]="arm64"
["arm64"]="arm64"
["armv7l"]="armhf"
["i386"]="i386"
["i486"]="i386"
["i586"]="i386"
["i686"]="i386"
)

# Persistent logging configuration.
Expand All @@ -102,4 +102,4 @@ readonly LWBS_LOG_FILE_PREFIX="run"
# Permissions applied to application state and log files.
readonly LWBS_STATE_DIR_MODE="700"
readonly LWBS_LOG_DIR_MODE="700"
readonly LWBS_LOG_FILE_MODE="600"
readonly LWBS_LOG_FILE_MODE="600"
2 changes: 1 addition & 1 deletion config/packages/debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ LWBS_CAPABILITY_PACKAGES=(
[sed]="sed"
[wget]="wget"
[xz]="xz-utils"
)
)
2 changes: 1 addition & 1 deletion config/packages/kali.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ LWBS_CAPABILITY_PACKAGES=(
[sed]="sed"
[wget]="wget"
[xz]="xz-utils"
)
)
2 changes: 1 addition & 1 deletion config/packages/ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ LWBS_CAPABILITY_PACKAGES=(
[sed]="sed"
[wget]="wget"
[xz]="xz-utils"
)
)
2 changes: 1 addition & 1 deletion distros/debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,4 @@ distro_install_local_package() {

run_privileged_command \
apt-get install --yes "$package_file"
}
}
2 changes: 1 addition & 1 deletion distros/kali.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,4 @@ distro_install_local_package() {

run_privileged_command \
apt-get install --yes "$package_file"
}
}
2 changes: 1 addition & 1 deletion distros/ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,4 @@ distro_install_local_package() {

run_privileged_command \
apt-get install --yes "$package_file"
}
}
2 changes: 1 addition & 1 deletion lib/arguments.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ parse_arguments() {
done

return 0
}
}
2 changes: 1 addition & 1 deletion lib/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,4 @@ select_distro_profile() {
fi

choose_distro_profile
}
}
2 changes: 1 addition & 1 deletion lib/capability.sh
Original file line number Diff line number Diff line change
Expand Up @@ -263,4 +263,4 @@ reset_capability_map() {
LWBS_CAPABILITY_PROFILE=""
LWBS_CAPABILITY_MAP_PATH=""
LWBS_CAPABILITY_PACKAGES=()
}
}
2 changes: 1 addition & 1 deletion lib/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -218,4 +218,4 @@ load_user_config() {
"Configured default distribution profile: $LWBS_CONFIG_DISTRO_PROFILE"

return 0
}
}
2 changes: 1 addition & 1 deletion lib/core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ is_supported_distro() {
done

return 1
}
}
2 changes: 1 addition & 1 deletion lib/detect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,4 @@ detect_architecture() {

printf '%s\n' \
"${LWBS_ARCH_ALIASES[$architecture]:-$architecture}"
}
}
2 changes: 1 addition & 1 deletion lib/distro.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@ reset_distro_adapter_contract() {

DISTRO_ADAPTER_PROFILE=""
DISTRO_ADAPTER_PATH=""
}
}
2 changes: 1 addition & 1 deletion lib/execution.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ run_privileged_command() {
# sudo executes the requested command while run_command retains the
# common execution and exit-code handling.
run_command sudo -- "$@"
}
}
2 changes: 1 addition & 1 deletion lib/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -727,4 +727,4 @@ reset_external_installer_contract() {
LWBS_EXTERNAL_METHOD=""
LWBS_EXTERNAL_PATH=""
LWBS_EXTERNAL_STAGE_DIR=""
}
}
2 changes: 1 addition & 1 deletion lib/logging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ log_warning() {
# Write an error event to the session log.
log_error() {
log_message "ERROR" "$1"
}
}
8 changes: 4 additions & 4 deletions lib/module.sh
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,10 @@ load_module() {
done <<<"$external_output"
fi

if ((${#LWBS_MODULE_CAPABILITIES[@]} == 0 &&
if ((${#LWBS_MODULE_CAPABILITIES[@]} == 0 && \
${#LWBS_MODULE_EXTERNAL_INSTALLERS[@]} == 0)) &&
! declare -F module_apply >/dev/null 2>&1 &&
! declare -F module_verify >/dev/null 2>&1; then
! declare -F module_apply >/dev/null 2>&1 &&
! declare -F module_verify >/dev/null 2>&1; then

printf 'Error: module %s does not declare any actions.\n' \
"$requested_module" >&2
Expand Down Expand Up @@ -390,4 +390,4 @@ reset_module_contract() {
LWBS_MODULE_PATH=""
LWBS_MODULE_CAPABILITIES=()
LWBS_MODULE_EXTERNAL_INSTALLERS=()
}
}
6 changes: 3 additions & 3 deletions lib/plan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ show_execution_plan() {
}

execution_plan_has_changes() {
((LWBS_PLAN_INSTALL_ACTION_COUNT > 0 ||
LWBS_PLAN_CUSTOM_ACTION_COUNT > 0))
((LWBS_PLAN_INSTALL_ACTION_COUNT > 0 || \
LWBS_PLAN_CUSTOM_ACTION_COUNT > 0))
}

execute_planned_packages() {
Expand Down Expand Up @@ -890,4 +890,4 @@ reset_execution_plan() {
LWBS_PLAN_EXTERNAL_ACTIONS=()
LWBS_PLAN_MODULE_HAS_APPLY=()
LWBS_PLAN_MODULE_HAS_VERIFY=()
}
}
2 changes: 1 addition & 1 deletion lib/profile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -235,4 +235,4 @@ reset_profile_contract() {
LWBS_PROFILE_DESCRIPTION=""
LWBS_PROFILE_PATH=""
LWBS_PROFILE_MODULES=()
}
}
130 changes: 0 additions & 130 deletions lib/testlib.sh

This file was deleted.

Loading
Loading