Refactored check_version function to use variables from path.sh

This commit is contained in:
Whispering Wind
2024-12-15 12:50:03 +03:30
committed by GitHub
parent 42340c0319
commit ceb790f9d9

View File

@ -40,9 +40,9 @@ version_greater_equal() {
}
check_version() {
local_version=$(cat /etc/hysteria/VERSION)
latest_version=$(curl -s https://raw.githubusercontent.com/ReturnFI/Hysteria2/main/VERSION)
latest_changelog=$(curl -s https://raw.githubusercontent.com/ReturnFI/Hysteria2/main/changelog)
local_version=$(cat $LOCALVERSION)
latest_version=$(curl -s $LATESTVERSION)
latest_changelog=$(curl -s $LASTESTCHANGE)
if version_greater_equal "$local_version" "$latest_version"; then
echo -e "Panel Version: ${cyan}$local_version${NC}"