From 6deef1d40ae106a92d2b78f666bf4cae4c0f7ddf Mon Sep 17 00:00:00 2001 From: Libretto <> Date: Sun, 21 Apr 2024 23:49:16 +0200 Subject: [PATCH] Build deps: Clearer variable names --- automation_tools/install_dependencies.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/automation_tools/install_dependencies.sh b/automation_tools/install_dependencies.sh index 0243fc15..3daa4edb 100755 --- a/automation_tools/install_dependencies.sh +++ b/automation_tools/install_dependencies.sh @@ -1,14 +1,14 @@ #!/bin/bash # This script is installing the required dependencies to correctly run the pipeline and build the flatpak -unset result +unset pkg_mgr # rpm-ostree must be checked before dnf because a dnf (wrapper) command also works on rpm-ostree distros (not what we want) -for pkg_manager in apt pacman rpm-ostree dnf; do - command -v "$pkg_manager" &> /dev/null && result="$pkg_manager" && break +for potential_pkg_mgr in apt pacman rpm-ostree dnf; do + command -v "$potential_pkg_mgr" &> /dev/null && pkg_mgr="$potential_pkg_mgr" && break done -case $result in +case "$pkg_mgr" in apt) sudo apt install -y flatpak flatpak-builder p7zip-full xmlstarlet bzip2 curl jq ;; @@ -23,7 +23,7 @@ case $result in sudo dnf install -y flatpak flatpak-builder p7zip p7zip-plugins xmlstarlet bzip2 curl ;; *) - echo "Package manager $result not supported. Please open an issue." + echo "Package manager $pkg_mgr not supported. Please open an issue." ;; esac