From 60b67ceb10bf5697a5999c68fa6d80a6439c1066 Mon Sep 17 00:00:00 2001 From: Dominik Dzienia Date: Fri, 25 Oct 2024 10:04:39 +0000 Subject: [PATCH] Fixed update checks --- install.sh | 4 ++-- src/lib.sh | 4 ++-- updated | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index 1a0df67..64fc959 100644 --- a/install.sh +++ b/install.sh @@ -1188,7 +1188,7 @@ update_if_needed() { local msgNs="$(printf "\U1F7E2") $nsEnvLocalVer" local msgComp="$(printf "\U1F7E2") $compLocalVer" - if ! [ "$instOnlineVer" == "$instLocalVer" ] || ! [ "$onlineUpdated" == "$lastUpdate" ]; then + if ! [ "$instOnlineVer" == "$instLocalVer" ] || ! [ "$lastDownload" == "$updateInstalled" ]; then changed=$((changed + 1)) msgInst="$(printf "\U1F534") $instLocalVer $(printf "\U27A1") $instOnlineVer" fi @@ -1257,7 +1257,7 @@ update_if_needed() { echo "$onlineUpdated" >"$UPDATES_DIR/updated" - if ! [ "$instOnlineVer" == "$instLocalVer" ] || ! [ "$onlineUpdated" == "$lastUpdate" ]; then + if ! [ "$instOnlineVer" == "$instLocalVer" ] || ! [ "$lastDownload" == "$updateInstalled" ]; then ohai "Updating $TOOL_FILE" cp -fr "$UPDATES_DIR/install.sh" "$TOOL_FILE" okdlg "Aktualizacja zakończona" "Narzędzie zostanie uruchomione ponownie" diff --git a/src/lib.sh b/src/lib.sh index 57b5ed4..28feeb8 100644 --- a/src/lib.sh +++ b/src/lib.sh @@ -1172,7 +1172,7 @@ update_if_needed() { local msgNs="$(printf "\U1F7E2") $nsEnvLocalVer" local msgComp="$(printf "\U1F7E2") $compLocalVer" - if ! [ "$instOnlineVer" == "$instLocalVer" ] || ! [ "$onlineUpdated" == "$lastUpdate" ]; then + if ! [ "$instOnlineVer" == "$instLocalVer" ] || ! [ "$lastDownload" == "$updateInstalled" ]; then changed=$((changed + 1)) msgInst="$(printf "\U1F534") $instLocalVer $(printf "\U27A1") $instOnlineVer" fi @@ -1241,7 +1241,7 @@ update_if_needed() { echo "$onlineUpdated" >"$UPDATES_DIR/updated" - if ! [ "$instOnlineVer" == "$instLocalVer" ] || ! [ "$onlineUpdated" == "$lastUpdate" ]; then + if ! [ "$instOnlineVer" == "$instLocalVer" ] || ! [ "$lastDownload" == "$updateInstalled" ]; then ohai "Updating $TOOL_FILE" cp -fr "$UPDATES_DIR/install.sh" "$TOOL_FILE" okdlg "Aktualizacja zakończona" "Narzędzie zostanie uruchomione ponownie" diff --git a/updated b/updated index fd5a83f..f5aa18d 100644 --- a/updated +++ b/updated @@ -1 +1 @@ -2024-10-25T09:57:52.084Z \ No newline at end of file +2024-10-25T10:04:13.801Z \ No newline at end of file