mirror of
https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root.git
synced 2025-12-06 08:07:40 +00:00
Update utils.sh
This commit is contained in:
@@ -6,7 +6,6 @@
|
|||||||
checker() {
|
checker() {
|
||||||
curl -sL https://api.github.com/repos/$1/releases/latest > json.txt
|
curl -sL https://api.github.com/repos/$1/releases/latest > json.txt
|
||||||
latest_version=$(jq -r '.name' json.txt)
|
latest_version=$(jq -r '.name' json.txt)
|
||||||
echo $latest_version > latest-version.txt
|
|
||||||
curl -sL "https://api.github.com/repos/$repository/releases/latest" | jq -r '.assets[] | select(.name == "'$2'-version.txt") | .browser_download_url' | xargs curl -sLO
|
curl -sL "https://api.github.com/repos/$repository/releases/latest" | jq -r '.assets[] | select(.name == "'$2'-version.txt") | .browser_download_url' | xargs curl -sLO
|
||||||
cur_version=$(cat $2-version.txt)
|
cur_version=$(cat $2-version.txt)
|
||||||
if [ "$latest_version" = "$cur_version" ]; then
|
if [ "$latest_version" = "$cur_version" ]; then
|
||||||
@@ -14,8 +13,8 @@ if [ "$latest_version" = "$cur_version" ]; then
|
|||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo "New patch, building..."
|
echo "New patch, building..."
|
||||||
rm -f ./$2-version.txt ./json.txt
|
rm -f ./json.txt
|
||||||
mv latest-version.txt $2-version.txt
|
echo $latest_version > $2-version.txt
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user