remove duplicate if -d /etc/debian_version (#136)

This commit is contained in:
xiagw 2020-09-21 14:01:12 +07:00 committed by GitHub
parent 315646ae12
commit 8cdb0c5968
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,14 +31,12 @@ function checkOS() {
if [[ -e /etc/debian_version ]]; then if [[ -e /etc/debian_version ]]; then
source /etc/os-release source /etc/os-release
OS="${ID}" # debian or ubuntu OS="${ID}" # debian or ubuntu
if [[ -e /etc/debian_version ]]; then
if [[ ${ID} == "debian" || ${ID} == "raspbian" ]]; then if [[ ${ID} == "debian" || ${ID} == "raspbian" ]]; then
if [[ ${VERSION_ID} -ne 10 ]]; then if [[ ${VERSION_ID} -ne 10 ]]; then
echo "Your version of Debian (${VERSION_ID}) is not supported. Please use Debian 10 Buster" echo "Your version of Debian (${VERSION_ID}) is not supported. Please use Debian 10 Buster"
exit 1 exit 1
fi fi
fi fi
fi
elif [[ -e /etc/fedora-release ]]; then elif [[ -e /etc/fedora-release ]]; then
source /etc/os-release source /etc/os-release
OS="${ID}" OS="${ID}"