Add nodl flag
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user