Change Update to use non-POSIX techniques

QNAP BusyBox 'grep' no longer supports POSIX.
Refactor to alternative method
This commit is contained in:
ChuckPa 2025-01-03 19:03:01 -05:00
parent 804c9014d1
commit 48f7ff7f36
No known key found for this signature in database
GPG Key ID: 3CE28A0F6BC31B5B
2 changed files with 8 additions and 4 deletions

View File

@ -2,12 +2,12 @@
#########################################################################
# Plex Media Server database check and repair utility script. #
# Maintainer: ChuckPa #
# Version: v1.10.01 #
# Date: 02-Jan-2025 #
# Version: v1.10.02 #
# Date: 03-Jan-2025 #
#########################################################################
# Version for display purposes
Version="v1.10.01"
Version="v1.10.02"
# Have the databases passed integrity checks
CheckedDB=0
@ -1633,7 +1633,7 @@ DoUpdateTimestamp() {
GetLatestRelease() {
Response=$(curl -s "https://api.github.com/repos/ChuckPa/PlexDBRepair/tags")
if [ $? -eq 0 ]; then
LatestVersion="$(echo "$Response" | grep -oP '"name":\s*"\K[^"]*' | sed -n '1p')"
LatestVersion="$(echo "$Response" | awk -F : '{print $2}' | awk -F \, '{print $1}' | tr -d \")"
else
LatestVersion="$Version"
fi

View File

@ -8,6 +8,10 @@
![Maintenance](https://img.shields.io/badge/Maintained-Yes-green.svg)
# Release Info:
v1.10.02
1. Refactor UPDATE - QNAP BusyBox no longer support POSIX grep. Refactored.
v1.10.01
1. Minor cleanup - Cleanup purge/prune handling after merging commands into one.