]> Frank Brehm's Git Trees - pixelpark/admin-tools.git/commitdiff
Note for simulation mode
authorFrank Brehm <frank@brehm-online.com>
Fri, 23 Apr 2021 10:44:43 +0000 (12:44 +0200)
committerFrank Brehm <frank@brehm-online.com>
Fri, 23 Apr 2021 10:44:43 +0000 (12:44 +0200)
bin/update-minecraft-server-jar

index ee1a8c4ebf98c18e3df7b21659796d7756119ce0..aab47cf421b8f662ea73fec5b5114e173e3c7306 100755 (executable)
@@ -255,6 +255,13 @@ check_sha1() {
 
     info "Checking SHA1 sum integrety of '${CYAN}${TARGET_JAR}${NORMAL}' ..."
 
+    if [[ ! -f "${TARGET_JAR}" ]] ; then
+        if [[ "${SIMULATE}" == "y" ]] ; then
+            debug "Simulation mode - jar file must not exists."
+            return 0
+        fi
+    fi
+
     local cur_sha1sum=$( sha1sum "${TARGET_JAR}" | awk '{print $1}' )
     debug "SHA1 sum of current file: '${cur_sha1sum}'."