/*
goredo -- djb's redo implementation on pure Go
-Copyright (C) 2020-2021 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2020-2022 Sergey Matveev <stargrave@stargrave.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
return hex.EncodeToString(h.Sum(nil)), nil
}
-func writeDep(fdDep *os.File, cwd, tgt string) error {
+func depWrite(fdDep *os.File, cwd, tgt string) error {
tracef(CDebug, "ifchange: %s <- %s", fdDep.Name(), tgt)
fd, err := os.Open(path.Join(cwd, tgt))
if err != nil {
return recfileWrite(fdDep, fields...)
}
-func writeDeps(fdDep *os.File, tgts []string) error {
+func depsWrite(fdDep *os.File, tgts []string) error {
if fdDep == nil {
tracef(CDebug, "no opened fdDep: %s", tgts)
return nil
panic(err)
}
if _, errStat := os.Stat(tgt); errStat == nil {
- err = writeDep(fdDep, tgtDir, tgtRel)
+ err = depWrite(fdDep, tgtDir, tgtRel)
} else {
tracef(CDebug, "ifchange: %s <- %s (non-existing)", fdDep.Name(), tgtRel)
fields := []recfile.Field{