File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/bash
22
3- # We are going to use /etc/os-release to identify which
4- # Linux distribution we are currently running.
5- . /etc/os-release
6-
7- if [[ $ID_LIKE == " debian" ]]; then
3+ if [ -x " $( command -v apt) " ]; then
84PKGMAN=" apt"
95
106packages=(
@@ -48,7 +44,7 @@ packages=(
4844
4945function install_package() { apt-get install -y $1 ; }
5046function query_package() { dpkg -l | grep -q $1 ; }
51- elif [[ $ID == " arch " ]] ; then # if [[ $ID_LIKE == "debian" ] ]; then
47+ elif [ -x " $( command -v pacman ) " ] ; then # if [ -x "$(command -v apt)" ]; then
5248PKGMAN=" pacman"
5349
5450packages=(
@@ -94,4 +90,4 @@ packages=(
9490
9591function install_package() { pacman -S $1 --noconfirm; }
9692function query_package() { pacman -Q | grep -q $1 ; }
97- fi # elif [[ $ID == "arch" ] ]; then
93+ fi # elif [ -x "$(command -v pacman)" ]; then
You can’t perform that action at this time.
0 commit comments