This commit is contained in:
Fioren
2024-03-16 16:33:12 +07:00
committed by GitHub
parent 97e0d46756
commit e503ee663a

View File

@@ -2,7 +2,7 @@
# Check github connection stable or not: # Check github connection stable or not:
check_connection() { check_connection() {
wget -q $(curl -s "https://api.github.com/repos/revanced/revanced-patches/releases/latest" | jq -r '.assets[] | select(.name == "patches.json") | .browser_download_url') wget -q $(curl -s "https://api.github.com/repos/revanced/revanced-patches/releases/latest" | jq -r '.assets[] | select(.name == "patches.json") | .browser_download_url') || rm -f "patches.json"
if [ -f patches.json ]; then if [ -f patches.json ]; then
echo "internet_error=0" >> $GITHUB_OUTPUT echo "internet_error=0" >> $GITHUB_OUTPUT
echo -e "\e[32mGithub connection OK\e[0m" echo -e "\e[32mGithub connection OK\e[0m"
@@ -11,4 +11,4 @@ check_connection() {
echo -e "\e[31mGithub connection not stable!\e[0m" echo -e "\e[31mGithub connection not stable!\e[0m"
fi fi
} }
check_connection check_connection