]> Frank Brehm's Git Trees - pixelpark/admin-tools.git/commitdiff
Cancel update, if latest version already active
authorFrank Brehm <frank@brehm-online.com>
Fri, 23 Apr 2021 10:46:53 +0000 (12:46 +0200)
committerFrank Brehm <frank@brehm-online.com>
Fri, 23 Apr 2021 10:46:53 +0000 (12:46 +0200)
bin/update-minecraft-server-jar

index aab47cf421b8f662ea73fec5b5114e173e3c7306..450c5a9ec9e498ab8fb3f41399a6de72a1b2d9f9 100755 (executable)
@@ -404,13 +404,13 @@ main() {
     check_preferences
     detecting_cur_version
     get_upstream_info
+    if [[ "${UPSTREAM_VERSION}" == "${CURRENT_VERSION}" ]] ; then
+        info "Version '${GREEN}${UPSTREAM_VERSION}${NORMAL}' not changed, no update."
+        exit 0
+    fi
     if [[ ! -f "${TARGET_JAR}" ]] ; then
         do_download
     fi
-    # if [[ "${UPSTREAM_VERSION}" == "${CURRENT_VERSION}" ]] ; then
-    #     info "Version '${GREEN}${UPSTREAM_VERSION}${NORMAL}' not changed, no update."
-    #     exit 0
-    # fi
     check_sha1
     fix_symlinks