1 Révisions

Auteur SHA1 Message Date
5c534c23bc Major refactor, bump version to 0.2 2020-04-24 14:13:27 -04:00

Voir le fichier

@@ -337,8 +337,6 @@ EOF
# Installs a package using the system package manager
# Arguments:
# One or more package names
# Options:
# --noquery, -n: Do not query the package state
# Returns:
# Will exit 1 if failed
#######################################
@@ -346,29 +344,6 @@ EOF
_runDebug "${FUNCNAME[0]}" "$@"
unset _noquery _pkg_array _url_pkg_array
if _input=$(getopt -o +n -l noquery -- "$@"); then
eval set -- "$_input"
while true; do
case "$1" in
--noquery|-n)
local _noquery="true"
;;
--)
shift
break
;;
esac
shift
done
else
err "Incorrect options provided"
_printHelpAndExit 1
fi
echo "DEBUG:" "$@"
# We will add packages to this array if their command is not available
local -a _pkg_array
local -a _url_pkg_array
@@ -378,13 +353,11 @@ EOF
# Clean up package name and handle OS-specific tweaks
_packageQuirks "$_pkg"
# Insert the package name to test if already installed
if [[ "$_pkg" != "" ]]; then
if [[ -n $_noquery ]] || ! _pkg_query "$_pkg" > /dev/null 2>&1; then
if [[ -n $_url_pkg ]]; then
_url_pkg_array+=("$_url_pkg")
else
_pkg_array+=("$_pkg")
fi
if [[ -n $_force ]] || [[ "$_pkg" != "" ]] && ! _pkg_query "$_pkg" > /dev/null 2>&1; then
if [[ -n $_url_pkg ]]; then
_url_pkg_array+=("$_url_pkg")
else
_pkg_array+=("$_pkg")
fi
fi
done
@@ -394,8 +367,7 @@ EOF
# Install from package name (with gpg check)
if [[ ${#_pkg_array[@]} -ge 1 ]]; then
echo "Installing:" "${_pkg_array[@]}"
echo "Installing: " "${_pkg_array[@]}"
if [[ -n $_debug ]]; then
if ! _pkg_install "${_pkg_array[@]}"; then
err "Failed to install required package"
@@ -409,7 +381,7 @@ EOF
# Install from package url (without gpg check)
if [[ ${#_url_pkg_array[@]} -ge 1 ]]; then
echo "Installing:" "${_url_pkg_array[@]}"
echo "Installing: " "${_url_pkg_array[@]}"
if [[ -n $_debug ]]; then
if ! _pkg_install_nogpg "${_url_pkg_array[@]}"; then
err "Failed to install required package from url"
@@ -1229,7 +1201,7 @@ EOF"
if [[ -n $_rpminstall ]]; then
if [[ "$ID" =~ ^(fedora|centos)$ ]]; then
_installPackage rpmfusion-free-release epel-release
_installPackage --noquery "$_mcrpm"
_installPackage "$_mcrpm"
_symlinkCerts
_restoreLicense
_openFirewall