Skip to content

Improve package manager detection #102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 19, 2023
Merged
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
10 changes: 3 additions & 7 deletions tools/deps/deps_linux
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#!/usr/bin/bash

# We are going to use /etc/os-release to identify which
# Linux distribution we are currently running.
. /etc/os-release

if [[ $ID_LIKE == "debian" ]]; then
if [ -x "$(command -v apt)" ]; then
PKGMAN="apt"

packages=(
Expand Down Expand Up @@ -48,7 +44,7 @@ packages=(

function install_package() { apt-get install -y $1; }
function query_package() { dpkg -l | grep -q $1; }
elif [[ $ID == "arch" ]]; then # if [[ $ID_LIKE == "debian" ]]; then
elif [ -x "$(command -v pacman)" ]; then # if [ -x "$(command -v apt)" ]; then
PKGMAN="pacman"

packages=(
Expand Down Expand Up @@ -93,4 +89,4 @@ packages=(

function install_package() { pacman -S $1 --noconfirm; }
function query_package() { pacman -Q | grep -q $1; }
fi # elif [[ $ID == "arch" ]]; then
fi # elif [ -x "$(command -v pacman)" ]; then