Fix error on bsd sed

gnu tools > bsd tools.
This commit is contained in:
LukeZGD 2023-04-19 18:11:06 +08:00
parent 454b5b027b
commit 245370e98d

View File

@ -392,7 +392,7 @@ version_check() {
else else
log "Checking for updates..." log "Checking for updates..."
github_api=$(curl https://api.github.com/repos/LukeZGD/Legacy-iOS-Kit/releases/latest 2>/dev/null) github_api=$(curl https://api.github.com/repos/LukeZGD/Legacy-iOS-Kit/releases/latest 2>/dev/null)
version_latest=$(echo "$github_api" | grep "latest/Legacy-iOS-Kit_complete" | cut -c 123- | cut -c -9 | sed -r 's/\.$//') version_latest=$(echo "$github_api" | grep "latest/Legacy-iOS-Kit_complete" | cut -c 123- | cut -c -9 | sed -e 's/\.$//')
git_hash_latest=$(echo "$github_api" | grep "latest/git-hash" | cut -c 119- | cut -c -7) git_hash_latest=$(echo "$github_api" | grep "latest/git-hash" | cut -c 119- | cut -c -7)
if [[ -z $version_latest ]]; then if [[ -z $version_latest ]]; then
warn "Failed to check for updates. GitHub may be down or blocked by your network." warn "Failed to check for updates. GitHub may be down or blocked by your network."