mirror of
https://github.com/Snowy-Fluffy/zapret.installer.git
synced 2025-12-06 09:03:04 +03:00
added altlinux support
This commit is contained in:
@@ -16,9 +16,10 @@ install_dependencies() {
|
||||
debian|ubuntu|mint) echo "$SUDO apt update -y && $SUDO apt install -y git" ;;
|
||||
fedora) echo "$SUDO dnf check-update -y && $SUDO dnf install -y git" ;;
|
||||
void) echo "$SUDO xbps-install -S && $SUDO xbps-install -y git" ;;
|
||||
gentoo) echo "$SUDO emerge --sync --quiet && $SUDO emerge --ask=n dev-vcs/git" ;;
|
||||
gentoo) echo "$SUDO emerge --sync --quiet && $SUDO emerge --ask=n dev-vcs/git app-shells/bash" ;;
|
||||
opensuse) echo "$SUDO zypper refresh -y && $SUDO zypper install -y git" ;;
|
||||
openwrt) echo "$SUDO opkg update && $SUDO opkg install git git-http bash" ;;
|
||||
altlinux) echo "$SUDO apt-get update -y && $SUDO apt-get install -y git bash" ;;
|
||||
*) echo "" ;;
|
||||
esac
|
||||
}
|
||||
@@ -34,14 +35,16 @@ install_dependencies() {
|
||||
eval "$install_cmd"
|
||||
else
|
||||
echo "Неизвестная ОС: ${ID:-Неизвестно}"
|
||||
exit 1
|
||||
echo "Установите git и bash самостоятельно."
|
||||
sleep 2
|
||||
fi
|
||||
elif [ "$kernel" = "Darwin" ]; then
|
||||
echo "macOS не поддерживается на данный момент."
|
||||
exit 1
|
||||
else
|
||||
echo "Неизвестная ОС: $kernel"
|
||||
exit 1
|
||||
echo "Установите git и bash самостоятельно."
|
||||
sleep 2
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -291,6 +291,7 @@ install_dependencies() {
|
||||
["gentoo"]="emerge net-firewall/iptables net-firewall/ipset"
|
||||
["opensuse"]="zypper install -y iptables ipset"
|
||||
["openwrt"]="opkg install iptables ipset"
|
||||
["altlinux"]="apt-get install -y iptables ipset"
|
||||
)
|
||||
|
||||
if [[ -v command_by_ID[$ID] ]]; then
|
||||
@@ -301,7 +302,8 @@ install_dependencies() {
|
||||
elif [ "$kernel" = "Darwin" ]; then
|
||||
error_exit "macOS не поддерживается на данный момент."
|
||||
else
|
||||
error_exit "Неизвестная ОС: ${kernel}"
|
||||
echo "Неизвестная ОС: ${kernel}. Установите iptables и ipset самостоятельно." bash -c 'read -p "Нажмите Enter для продолжения..."'
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user