File tree 1 file changed +3
-7
lines changed
1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/bash
2
2
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
8
4
PKGMAN=" apt"
9
5
10
6
packages=(
@@ -48,7 +44,7 @@ packages=(
48
44
49
45
function install_package() { apt-get install -y $1 ; }
50
46
function 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
52
48
PKGMAN=" pacman"
53
49
54
50
packages=(
@@ -94,4 +90,4 @@ packages=(
94
90
95
91
function install_package() { pacman -S $1 --noconfirm; }
96
92
function 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