linux
Submodule ¶
Structs ¶
LinuxInstallPackageProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
packages |
typing.List[str] |
A string listing all the packages to be installed, separated by spaces. |
sudo |
bool |
Specifies whether the command(s) should be executed with sudo. |
packages
Required ¶
- Type: typing.List[str]
A string listing all the packages to be installed, separated by spaces.
sudo
Optional ¶
- Type: bool
- Default: false
Specifies whether the command(s) should be executed with sudo.
Classes ¶
LinuxScripts ¶
Static Functions ¶
Name | Description |
---|---|
install_packages |
Returns a shell command to check and install a Linux package using the available package manager. |
install_packages
¶
Returns a shell command to check and install a Linux package using the available package manager.
This function is useful for installing packages within a GitLab job when the system's package manager is uncertain. Currently supported package managers are: apk, apt-get, yum, dnf, and zypper.
Keep in mind that this function supports installing only one package name. If different package managers have different names for the same package, this script might fail.
Source: https://unix.stackexchange.com/a/571192/139685
packages
Required ¶
- Type: typing.List[str]
A string listing all the packages to be installed, separated by spaces.
sudo
Optional ¶
- Type: bool
- Default: false
Specifies whether the command(s) should be executed with sudo.
Created: November 14, 2023