From 67e726b19e133e39d9e657816a3daa067e8125bf Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Tue, 9 Jan 2024 20:51:34 +1100 Subject: [PATCH 1/2] Update syno_hdd_db.sh Bug fix for chmod failed on changes.txt --- syno_hdd_db.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh index 5d708e8..aa3d342 100644 --- a/syno_hdd_db.sh +++ b/syno_hdd_db.sh @@ -27,7 +27,7 @@ # Now warns if script is located on an M.2 volume. -scriptver="v3.4.78" +scriptver="v3.4.79" script=Synology_HDD_db repo="007revad/Synology_HDD_db" scriptname=syno_hdd_db @@ -160,7 +160,7 @@ fi if [[ $debug == "yes" ]]; then - # set -x + set -x export PS4='`[[ $? == 0 ]] || echo "\e[1;31;40m($?)\e[m\n "`:.$LINENO:' fi @@ -341,13 +341,14 @@ if ! printf "%s\n%s\n" "$tag" "$scriptver" | sort --check=quiet --version-sort >/dev/null ; then echo -e "\n${Cyan}There is a newer version of this script available.${Off}" echo -e "Current version: ${scriptver}\nLatest version: $tag" - if [[ -f $scriptpath/$script-$shorttag.tar.gz ]]; then + scriptdl="$scriptpath/$script-$shorttag" + if [[ -f ${scriptdl}.tar.gz ]] || [[ -f ${scriptdl}.zip ]]; then # They have the latest version tar.gz downloaded but are using older version - echo "https://github.com/$repo/releases/latest" + echo "You have the latest version downloaded but are using an older version" sleep 10 - elif [[ -d $scriptpath/$script-$shorttag ]]; then + elif [[ -d $scriptdl ]]; then # They have the latest version extracted but are using older version - echo "https://github.com/$repo/releases/latest" + echo "You have the latest version extracted but are using an older version" sleep 10 else if [[ $autoupdate == "yes" ]]; then @@ -428,7 +429,7 @@ if ! printf "%s\n%s\n" "$tag" "$scriptver" | "$script-$shorttag/CHANGES.txt to:\n $scriptpath" else # Set permissions on CHANGES.txt - if ! chmod 664 "$scriptpath/CHANGES.txt"; then + if ! chmod 664 "$scriptpath/${scriptname}_CHANGES.txt"; then if [[ $autoupdate != "yes" ]]; then permerr=1; fi echo -e "${Error}ERROR${Off} Failed to set permissions on:" echo "$scriptpath/CHANGES.txt" From 89fd7b3e9b01de7b8c5d48c10150a9fe9e19cd5b Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Tue, 9 Jan 2024 20:52:09 +1100 Subject: [PATCH 2/2] Update CHANGES.txt --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index a899ec2..adbc584 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,6 @@ +v3.4.79 +- Bug fix for chmod failed on changes.txt + v3.4.78 - Added check that script is running on Synology NAS.