test
This commit is contained in:
parent
0b4f24c944
commit
3e16e4b6e0
@ -5,6 +5,8 @@ SCRIPTDIR=$(dirname $0)
|
|||||||
source "$SCRIPTDIR/common/colors.sh"
|
source "$SCRIPTDIR/common/colors.sh"
|
||||||
source "$SCRIPTDIR/common/functions.sh"
|
source "$SCRIPTDIR/common/functions.sh"
|
||||||
|
|
||||||
|
pkgmgr_update
|
||||||
|
|
||||||
## Start File Loop
|
## Start File Loop
|
||||||
## For .dependency files In The dependencies Directory
|
## For .dependency files In The dependencies Directory
|
||||||
DEPENDENCIESALL="$SCRIPTDIR/dependencies/*.dep"
|
DEPENDENCIESALL="$SCRIPTDIR/dependencies/*.dep"
|
||||||
|
|||||||
@ -45,6 +45,28 @@ get_pkg_mgr() {
|
|||||||
fi
|
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() {
|
install_pkg() {
|
||||||
|
|
||||||
# package to install
|
# package to install
|
||||||
|
|||||||
@ -1,13 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
s
|
s
|
||||||
## These are the colors used throughout the script.
|
## 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_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'
|
COL_LIGHT_BLUE='\e[38;5;111m%s\e[0m\n'
|
||||||
|
|
||||||
is_command() {
|
is_command() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user