Wire up yum
This commit is contained in:
12
installJRMC
12
installJRMC
@@ -1421,6 +1421,7 @@ uninstall() {
|
|||||||
echo "To remove your rpmbuild output files, run: rm -rf $OUTPUTDIR"
|
echo "To remove your rpmbuild output files, run: rm -rf $OUTPUTDIR"
|
||||||
elif [[ $? -eq 100 ]]; then
|
elif [[ $? -eq 100 ]]; then
|
||||||
err "JRiver Media Center package '$MCPKG' is not present"
|
err "JRiver Media Center package '$MCPKG' is not present"
|
||||||
|
err "and was not uninstalled"
|
||||||
else
|
else
|
||||||
err "Could not remove Media Center package"
|
err "Could not remove Media Center package"
|
||||||
fi
|
fi
|
||||||
@@ -1453,9 +1454,14 @@ main() {
|
|||||||
|
|
||||||
# Distro-specific commands
|
# Distro-specific commands
|
||||||
if [[ "$ID" =~ ^(fedora|centos)$ ]]; then
|
if [[ "$ID" =~ ^(fedora|centos)$ ]]; then
|
||||||
pkg_install(){ sudo dnf install -y "$@"; }
|
if hash dnf &>/dev/null; then
|
||||||
pkg_remove(){ sudo dnf remove -y "$@"; }
|
declare mgr="dnf"
|
||||||
pkg_update(){ sudo dnf makecache; }
|
elif hash yum &>/dev/null; then
|
||||||
|
declare mgr="yum"
|
||||||
|
fi
|
||||||
|
pkg_install(){ sudo "$mgr" install -y "$@"; }
|
||||||
|
pkg_remove(){ sudo "$mgr" remove -y "$@"; }
|
||||||
|
pkg_update(){ sudo "$mgr" makecache; }
|
||||||
pkg_query(){ rpm -q "$@"; }
|
pkg_query(){ rpm -q "$@"; }
|
||||||
firewall_cmd(){ sudo firewall-cmd "$@"; }
|
firewall_cmd(){ sudo firewall-cmd "$@"; }
|
||||||
elif [[ "$ID" =~ ^(debian|ubuntu)$ ]]; then
|
elif [[ "$ID" =~ ^(debian|ubuntu)$ ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user