Fixing install_package
This commit is contained in:
parent
86c0ae1496
commit
96db5efffa
1 changed files with 3 additions and 3 deletions
|
|
@ -132,19 +132,19 @@ class Linux {
|
||||||
|
|
||||||
if($distro=='debian' || $distro=='ubuntu') {
|
if($distro=='debian' || $distro=='ubuntu') {
|
||||||
|
|
||||||
Linux::shell_command('sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y '.$package[$distro]);
|
Linux::shell_command(['sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y '.$package[$distro]]);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if($distro=='fedora' || $distro=='almalinux' || $distro=='rocky') {
|
else if($distro=='fedora' || $distro=='almalinux' || $distro=='rocky') {
|
||||||
|
|
||||||
//if call("sudo dnf install -y {}".format(package[linux_distro]), shell=True) > 0:
|
//if call("sudo dnf install -y {}".format(package[linux_distro]), shell=True) > 0:
|
||||||
Linux::shell_command('sudo dnf install -y '.$package[$distro]);
|
Linux::shell_command(['sudo dnf install -y '.$package[$distro]]);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if($distro=='arch') {
|
else if($distro=='arch') {
|
||||||
|
|
||||||
//sudo pacman -S --noconfirm
|
//sudo pacman -S --noconfirm
|
||||||
Linux::shell_command('sudo pacman -S --noconfirm '.$package[$distro]);
|
Linux::shell_command(['sudo pacman -S --noconfirm '.$package[$distro]]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue