Compare commits

..

4 Commits

Author SHA1 Message Date
Chuck
66ad17da60 Merge pull request #110 from ChuckPa/chuckpa/cleanup-version
Cleanup version output
2023-11-10 12:47:09 -08:00
ChuckPa
4dcb686ab1 Cleanup version output
Update Release Notes
2023-11-10 15:40:26 -05:00
Chuck
c5a4a88f82 Merge pull request #109 from ChuckPa/chuckp/rewrite-update
Correct confirmation when not scripted.
2023-11-10 12:17:40 -08:00
ChuckPa
f6008d76b7 Correct confirmation when not scripted.
Fixes:  https://github.com/ChuckPa/PlexDBRepair/issues/108
2023-11-10 15:13:43 -05:00
2 changed files with 15 additions and 6 deletions

View File

@@ -2,12 +2,12 @@
#########################################################################
# Plex Media Server database check and repair utility script. #
# Maintainer: ChuckPa #
# Version: v1.01.00 #
# Date: 16-Oct-2023 #
# Version: v1.01.02 #
# Date: 10-Nov-2023 #
#########################################################################
# Version for display purposes
Version="v1.01.00"
Version="v1.01.02"
# Flag when temp files are to be retained
Retain=0
@@ -1446,7 +1446,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' | tr -d '[v\.]')"
LatestVersion="$(echo "$Response" | grep -oP '"name":\s*"\K[^"]*' | sed -n '1p')"
else
LatestVersion="$Version"
fi
@@ -1930,8 +1930,11 @@ do
Output "Checking for update"
GetLatestRelease
if [ $(VersionDigits $LatestVersion) -gt $(VersionDigits $Version) ]; then
[ $Scripted -eq 1 ] && DoUpdate=1
ConfirmYesNo "Download $Latest and update?" && DoUpdate=1
if [ $Scripted -eq 1 ]; then
DoUpdate=1
elif ConfirmYesNo "Download $LatestVersion and update?"; then
DoUpdate=1
fi
else
Output "No update available."
fi
@@ -1947,6 +1950,8 @@ do
Output "Restart to launch updated DBRepair.sh ($LatestVersion)"
WriteLog "Update - Updated to version $LatestVersion."
exit 0
else
Output "Unable to download and update. Error $Result."
fi
else
Output "Script path '${ScriptName}' is not writable."

View File

@@ -8,6 +8,10 @@
![Maintenance](https://img.shields.io/badge/Maintained-Yes-green.svg)
# Release Info:
v1.01.02
- Correct updating when scripted versus interactive.
v1.01.00
- Adds ability to self download and install latest version of DBRepair.sh