Fix offline update detection issue

This commit is contained in:
JeremyStar™ 2023-12-13 20:10:04 +01:00
parent 1aa3978309
commit 59508c691c

View file

@ -4,10 +4,11 @@ export "COLOR=31"
export "COLOR_REGULAR=\e[0;${COLOR}m" export "COLOR_REGULAR=\e[0;${COLOR}m"
export "COLOR_BOLD=\e[1;${COLOR}m" export "COLOR_BOLD=\e[1;${COLOR}m"
export "COLOR_RESET=\e[0m" export "COLOR_RESET=\e[0m"
export "COMMIT=$(env PAGER= git log -n 1 --pretty=format:\"%H\")"
export "LATEST_COMMIT=$(curl -sX 'GET' 'https://git.staropensource.de/api/v1/repos/JeremyStarTM/punktdateien/branches/develop' -H 'accept: application/json'|jq --monochrome-output '.commit.id')" export "LATEST_COMMIT=$(curl -sX 'GET' 'https://git.staropensource.de/api/v1/repos/JeremyStarTM/punktdateien/branches/develop' -H 'accept: application/json'|jq --monochrome-output '.commit.id')"
export "LATEST_COMMIT_MESSAGE=$(curl -sX 'GET' 'https://git.staropensource.de/api/v1/repos/JeremyStarTM/punktdateien/branches/develop' -H 'accept: application/json'|jq --monochrome-output '.commit.message'|sed 's/\\n//g')" export "LATEST_COMMIT_MESSAGE=$(curl -sX 'GET' 'https://git.staropensource.de/api/v1/repos/JeremyStarTM/punktdateien/branches/develop' -H 'accept: application/json'|jq --monochrome-output '.commit.message'|sed 's/\\n//g')"
if [ "$(env PAGER= git log -n 1 --pretty=format:\"%H\")" == "$LATEST_COMMIT" ]; then if [ "$COMMIT" == "$LATEST_COMMIT" ] || [ -n "$COMMIT" ]; then
export "UPDATE=false" export "UPDATE=false"
else else
export "UPDATE=true" export "UPDATE=true"