Function names consist of two parts, one that refers to the package manager that is being operated on, and the second refers the specific operation to be done on that package manager.
The part that refers two the package manager always start with an underscore (_
) and then the exact command of the package manager is placed after.
For the second part, _install
and _update
are currently implemented.
Parameters
The parameteres passed to package manager functions depends solely on the operation of the function.
_update
functions don't take any parameters
_install
functions take package names to be installed, as seperate arguments.
Example
_pacman_install iproute2 python3 # install python3 and iproute2 using pacman
_apt-get_update # update the database of apt-get
Purpose
Echos the function prefix that works with current machines package manager.
Bhavior Checks for existance of package managers, and echos the function to use the one with the highest priority.
Current priority of package managers:
- apt
- apt-get
- dpkg (not implemented)
- pacman
- rpm (not implemented)
- dnf (not implemented)
Purpose
Install a package using the provided function by _package_manager_func_to_use
.
Parameters Package names to be installed, as seperate arguments.
Example
installpkg iproute2 python3 #install iproute2 and python3