Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
516a1f9b57 | |||
6b6dbdda99 | |||
54cc1d9a55 |
@ -2,6 +2,8 @@
|
||||
|
||||
CLI tool for updating and launching [Project Epoch](https://www.project-epoch.net/) on Windows, Linux and macOS.
|
||||
|
||||
If you're a Linux newbie or just looking for a simpler one-click solution, check out [this excellent Lutris script](https://lutris.net/games/project-epoch/) by another community member
|
||||
|
||||
## Installing
|
||||
|
||||
### Linux
|
||||
|
2
main.go
2
main.go
@ -49,7 +49,7 @@ func main() {
|
||||
log.Fatalf("WowDir in %s is still the default setting, exiting", cfgPath)
|
||||
}
|
||||
|
||||
stats, err := epoch.DownloadUpdate(config.WowDir, forceFlag, config.RemoveUnknownPatches)
|
||||
stats, err := epoch.Update(config.WowDir, forceFlag, config.RemoveUnknownPatches, false)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
@ -17,9 +17,10 @@ import (
|
||||
type DownloadStats struct {
|
||||
Updated int
|
||||
Current int
|
||||
Outdated int
|
||||
}
|
||||
|
||||
func DownloadUpdate(wowdir string, force bool, removeUnknown bool) (DownloadStats, error) {
|
||||
func Update(wowdir string, force bool, removeUnknown bool, skipDownload bool) (DownloadStats, error) {
|
||||
var stats DownloadStats
|
||||
|
||||
manifest, err := GetManifest()
|
||||
@ -52,10 +53,13 @@ func DownloadUpdate(wowdir string, force bool, removeUnknown bool) (DownloadStat
|
||||
fmt.Printf("File %s is up to date\n", localPath)
|
||||
stats.Current += 1
|
||||
continue
|
||||
} else {
|
||||
stats.Outdated += 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if !skipDownload {
|
||||
fmt.Printf("Updating %s...\n", localPath)
|
||||
|
||||
outFile, err := os.Create(localPath)
|
||||
@ -87,6 +91,7 @@ func DownloadUpdate(wowdir string, force bool, removeUnknown bool) (DownloadStat
|
||||
outFile.Close()
|
||||
stats.Updated += 1
|
||||
}
|
||||
}
|
||||
|
||||
if removeUnknown {
|
||||
patches := make([]string, 0)
|
||||
|
Reference in New Issue
Block a user