Remove support for Alpine Linux and correct judgment

pull/1/head
Dct Mei 2020-04-10 21:29:26 +08:00
parent 08559e320d
commit 8a2f69729f
No known key found for this signature in database
GPG Key ID: 50BF8B712DCAD7EA
1 changed files with 4 additions and 8 deletions

View File

@ -56,10 +56,10 @@ if [[ "$(uname)" == 'Linux' ]]; then
if [[ ! -f '/etc/os-release' ]]; then if [[ ! -f '/etc/os-release' ]]; then
echo "error: Don't use outdated Linux distributions." echo "error: Don't use outdated Linux distributions."
exit 1 exit 1
if [[ -z "$(ls -l /sbin/init | grep systemd)" ]]; then fi
echo "error: Only Linux distributions using systemd are supported." if [[ -z "$(ls -l /sbin/init | grep systemd)" ]]; then
exit 1 echo "error: Only Linux distributions using systemd are supported."
fi exit 1
fi fi
if [[ "$(command -v apt)" ]]; then if [[ "$(command -v apt)" ]]; then
PACKAGE_MANAGEMENT_UPDATE='apt update' PACKAGE_MANAGEMENT_UPDATE='apt update'
@ -78,10 +78,6 @@ if [[ "$(uname)" == 'Linux' ]]; then
PACKAGE_MANAGEMENT_UPDATE='zypper refresh' PACKAGE_MANAGEMENT_UPDATE='zypper refresh'
PACKAGE_MANAGEMENT_INSTALL='zypper install' PACKAGE_MANAGEMENT_INSTALL='zypper install'
PACKAGE_MANAGEMENT_REMOVE='zypper remove' PACKAGE_MANAGEMENT_REMOVE='zypper remove'
elif [[ "$(command -v apk)" ]]; then
PACKAGE_MANAGEMENT_UPDATE='apk update'
PACKAGE_MANAGEMENT_INSTALL='apk add'
PACKAGE_MANAGEMENT_REMOVE='apk del'
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