assume yes to remove action; sync repo while installing package

Fix https://github.com/v2fly/fhs-install-v2ray/pull/141/checks?check_run_id=1164621937
pull/141/head
IceCodeNew 2020-09-25 15:56:39 +08:00
parent 8e5c2e067f
commit 3540fe109c
1 changed files with 7 additions and 7 deletions

View File

@ -106,19 +106,19 @@ identify_the_operating_system_and_architecture() {
fi fi
if [[ "$(type -P apt)" ]]; then if [[ "$(type -P apt)" ]]; then
PACKAGE_MANAGEMENT_INSTALL='apt install -y --no-install-recommends' PACKAGE_MANAGEMENT_INSTALL='apt install -y --no-install-recommends'
PACKAGE_MANAGEMENT_REMOVE='apt purge' PACKAGE_MANAGEMENT_REMOVE='apt purge -y --auto-remove'
elif [[ "$(type -P dnf)" ]]; then elif [[ "$(type -P dnf)" ]]; then
PACKAGE_MANAGEMENT_INSTALL='dnf install -y' PACKAGE_MANAGEMENT_INSTALL='dnf install -y'
PACKAGE_MANAGEMENT_REMOVE='dnf remove' PACKAGE_MANAGEMENT_REMOVE='dnf remove -y'
elif [[ "$(type -P yum)" ]]; then elif [[ "$(type -P yum)" ]]; then
PACKAGE_MANAGEMENT_INSTALL='yum install -y' PACKAGE_MANAGEMENT_INSTALL='yum install -y'
PACKAGE_MANAGEMENT_REMOVE='yum remove' PACKAGE_MANAGEMENT_REMOVE='yum remove -y'
elif [[ "$(type -P zypper)" ]]; then elif [[ "$(type -P zypper)" ]]; then
PACKAGE_MANAGEMENT_INSTALL='zypper install -y' PACKAGE_MANAGEMENT_INSTALL='zypper install -y --no-recommends'
PACKAGE_MANAGEMENT_REMOVE='zypper remove' PACKAGE_MANAGEMENT_REMOVE='zypper remove -yu'
elif [[ "$(type -P pacman)" ]]; then elif [[ "$(type -P pacman)" ]]; then
PACKAGE_MANAGEMENT_INSTALL='pacman -S --noconfirm' PACKAGE_MANAGEMENT_INSTALL='pacman -Syu --noconfirm'
PACKAGE_MANAGEMENT_REMOVE='pacman -R' PACKAGE_MANAGEMENT_REMOVE='pacman -Rsun --noconfirm'
else else
echo "error: The script does not support the package manager in this operating system." echo "error: The script does not support the package manager in this operating system."
exit 1 exit 1