]> Cypherpunks.ru repositories - goredo.git/blobdiff - main.go
Move tai64nlocal to tai64n module
[goredo.git] / main.go
diff --git a/main.go b/main.go
index f466faa376813377582889cd955c8d3324fa3aa4..818b8dafeb830d85300c397107020572bfe0c32f 100644 (file)
--- a/main.go
+++ b/main.go
@@ -18,7 +18,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 package main
 
 import (
-       "bufio"
        "crypto/rand"
        "flag"
        "fmt"
@@ -91,7 +90,6 @@ func main() {
                                log.Println(err)
                        }
                }
-               fmt.Println("no creating optional:", os.Args[0], "<- tai64nlocal")
                os.Exit(rc)
        }
        log.SetFlags(0)
@@ -143,10 +141,11 @@ func main() {
        if Debug || os.Getenv(EnvLogPid) == "1" {
                MyPid = os.Getpid()
        }
+       var traced bool
        if *flagTrace {
-               Trace = true
+               traced = true
        } else {
-               Trace = os.Getenv(EnvTrace) == "1"
+               traced = os.Getenv(EnvTrace) == "1"
        }
 
        // Those are internal envs
@@ -176,6 +175,7 @@ func main() {
                        raw[0:4], raw[4:6], raw[6:8], raw[8:10], raw[10:],
                )
        }
+       statusInit()
 
        tgts := flag.Args()
        if len(tgts) == 0 {
@@ -190,13 +190,13 @@ CmdSwitch:
        switch cmdName {
        case "redo":
                for _, tgt := range tgts {
-                       ok, err = ifchange([]string{tgt}, true)
+                       ok, err = ifchange([]string{tgt}, true, traced)
                        if err != nil || !ok {
                                break
                        }
                }
        case "redo-ifchange":
-               ok, err = ifchange(tgts, false)
+               ok, err = ifchange(tgts, false, traced)
                writeDeps(fdDep, tgts)
        case "redo-ifcreate":
                if fdDep == nil {
@@ -270,10 +270,6 @@ CmdSwitch:
                        fmt.Println(cwdMustRel(cwd, m["Target"]))
                }
                ok = doFile != ""
-       case "tai64nlocal":
-               bw := bufio.NewWriter(os.Stdout)
-               err = tai64nLocal(bw, os.Stdin)
-               bw.Flush()
        default:
                log.Fatalln("unknown command", cmdName)
        }