This commit is contained in:
deathbybandaid 2022-03-15 19:46:16 -04:00
parent 0b4f24c944
commit 3e16e4b6e0
3 changed files with 24 additions and 6 deletions

View File

@ -5,6 +5,8 @@ SCRIPTDIR=$(dirname $0)
source "$SCRIPTDIR/common/colors.sh"
source "$SCRIPTDIR/common/functions.sh"
pkgmgr_update
## Start File Loop
## For .dependency files In The dependencies Directory
DEPENDENCIESALL="$SCRIPTDIR/dependencies/*.dep"

View File

@ -45,6 +45,28 @@ get_pkg_mgr() {
fi
}
pkgmgr_update(){
# Get Command language
PKG_MANAGER=$( get_pkg_mgr )
# Run apt-get update for distros that use apt-get
if [ "$PKG_MANAGER" == "apt-get" ] ; then
if should_apt_last_update ; then
"${PKG_MANAGER} update"
fi
fi
if [ "$PKG_MANAGER" == "apt-get" ] ; then
"$PKG_MANAGER" full-upgrade -y
elif [ "$PKG_MANAGER" == "dnf" ] ; then
"$PKG_MANAGER" update
elif [ "$PKG_MANAGER" == "yum" ] ; then
"$PKG_MANAGER" update
fi
}
install_pkg() {
# package to install

View File

@ -1,13 +1,7 @@
#!/bin/bash
s
## These are the colors used throughout the script.
COL_RED='\e[1;31m%s\e[0m\n'
COL_GREEN='\e[1;32m%s\e[0m\n'
COL_YELLOW='\e[1;33m%s\e[0m\n'
COL_BLUE='\e[1;34m%s\e[0m\n'
COL_MAGENTA='\e[1;35m%s\e[0m\n'
COL_CYAN='\e[1;36m%s\e[0m\n'
COL_ORANGE='\e[38;5;166m%s\e[0m\n'
COL_LIGHT_BLUE='\e[38;5;111m%s\e[0m\n'
is_command() {