renamed functions _install and _rename to pkg-install and pkg-rename
This commit is contained in:
parent
e658c15358
commit
cb1ac74aaf
1 changed files with 7 additions and 7 deletions
14
distros.sh
14
distros.sh
|
@ -178,7 +178,7 @@ checkAndInstall() {
|
|||
# ─< if it's not a list, then just check and install the package.. >──────────────────────
|
||||
if [[ -z $2 ]]; then
|
||||
if ! command_exists "$1"; then
|
||||
if run-silent pkg_install "$1"; then
|
||||
if run-silent pkg-install "$1"; then
|
||||
echo_pkg deps "$1 - ${GREEN}installed"
|
||||
else
|
||||
echo_pkg deps "$1 is already installed.."
|
||||
|
@ -193,7 +193,7 @@ checkAndInstall() {
|
|||
for deps in "${@}"; do
|
||||
# echo_pkg deps "Installing $deps"
|
||||
if ! command_exists $deps; then
|
||||
if run-silent pkg_install "$deps"; then
|
||||
if run-silent pkg-install "$deps"; then
|
||||
echo_pkg deps "$deps - ${GREEN}installed"
|
||||
else
|
||||
echo_pkg deps "$deps is already installed.."
|
||||
|
@ -251,7 +251,7 @@ check_env() {
|
|||
_setup() {
|
||||
case "$1" in
|
||||
debian | ubuntu)
|
||||
pkg_install() {
|
||||
pkg-install() {
|
||||
# $_sudo apt-get install --assume-yes "$@"
|
||||
if command_exists nala; then
|
||||
pkger=nala
|
||||
|
@ -278,7 +278,7 @@ _setup() {
|
|||
}
|
||||
;;
|
||||
fedora)
|
||||
pkg_install() {
|
||||
pkg-install() {
|
||||
pkger=dnf
|
||||
$_sudo dnf -y install "$@"
|
||||
}
|
||||
|
@ -298,7 +298,7 @@ _setup() {
|
|||
fi
|
||||
}
|
||||
|
||||
pkg_install() {
|
||||
pkg-install() {
|
||||
if command_exists paru; then
|
||||
pkger=paru
|
||||
# echo_pkg "Using paru"
|
||||
|
@ -332,7 +332,7 @@ _setup() {
|
|||
}
|
||||
;;
|
||||
opensuse)
|
||||
pkg_install() {
|
||||
pkg-install() {
|
||||
pkger=zypper
|
||||
$_sudo zypper in "$@"
|
||||
}
|
||||
|
@ -344,7 +344,7 @@ _setup() {
|
|||
}
|
||||
;;
|
||||
alpine)
|
||||
pkg_install() {
|
||||
pkg-install() {
|
||||
pkger=apk
|
||||
apk add "$@"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue