From de1b68af25a8ac260dd37207b8bd80334962608a Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Wed, 26 Mar 2025 21:08:50 +0100 Subject: [PATCH] Add nodl flag --- updater/main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/updater/main.go b/updater/main.go index fc99c7d2..3006fc6f 100644 --- a/updater/main.go +++ b/updater/main.go @@ -34,6 +34,7 @@ func init() { const remoteUrl = "https://git.site.quack-lab.dev/dave/barotrauma-gamefiles/raw/branch/cooked/Content" func main() { + nodl := flag.Bool("nodl", false, "nodl") hashfile := flag.String("hashfile", "hashes.txt", "hashfile") flag.Parse() @@ -126,6 +127,11 @@ func main() { file = strings.ReplaceAll(file, "\\", "/") path := filepath.Join(root, file) log.Printf("Downloading %s", file) + if *nodl { + log.Printf("Skipping download for %s", file) + hashes.Store(file, remoteHash) + return + } err := UpdateLocalFile(path, remoteUrl+"/"+file) if err != nil { Error.Printf("error updating local file: %v", err)