linux
Submodule ¶
Structs ¶
LinuxInstallPackageProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
packages |
string[] |
A string listing all the packages to be installed, separated by spaces. |
sudo |
boolean |
Specifies whether the command(s) should be executed with sudo. |
packages
Required ¶
- Type: string[]
A string listing all the packages to be installed, separated by spaces.
sudo
Optional ¶
- Type: boolean
- Default: false
Specifies whether the command(s) should be executed with sudo.
Classes ¶
LinuxScripts ¶
Static Functions ¶
Name | Description |
---|---|
installPackages |
Returns a shell command to check and install a Linux package using the available package manager. |
installPackages
¶
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
props
Required ¶
- Type: LinuxInstallPackageProps