delete everything button
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
ff978958b0
commit
c05eacf45a
|
@ -10,28 +10,24 @@ func globalResetOptions(box *gui.Node) {
|
||||||
buildOptions := group2.NewGrid("buildOptions", 2, 1)
|
buildOptions := group2.NewGrid("buildOptions", 2, 1)
|
||||||
|
|
||||||
buildOptions.NewLabel("start over")
|
buildOptions.NewLabel("start over")
|
||||||
buildOptions.NewButton("rm ~/go/src & ~/go/pkg", func() {
|
me.deleteGoSrcPkgB = buildOptions.NewButton("rm ~/go/src & ~/go/pkg", func() {
|
||||||
for _, repo := range me.allrepos {
|
for _, repo := range me.allrepos {
|
||||||
// status := repo.getStatus()
|
// status := repo.getStatus()
|
||||||
if repo.status.CheckDirty() {
|
if repo.status.CheckDirty() {
|
||||||
log.Warn("repo is dirty. commit your changes first", repo.String())
|
log.Warn("repo is dirty. commit your changes first", repo.String())
|
||||||
|
me.deleteGoSrcPkgB.SetLabel("rm ~/go/src (can't. dirty repos)")
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
log.Warn("repo is not dirty", repo.String())
|
log.Warn("repo is not dirty", repo.String())
|
||||||
log.Warn("TODO: check things are pushed and check every dir in go/src/")
|
log.Warn("TODO: check things are pushed and check every dir in go/src/")
|
||||||
|
me.deleteGoSrcPkgB.SetLabel("ARE YOU SURE?")
|
||||||
|
if me.deleteGoSrcPkgB.String() == "ARE YOU SURE?" {
|
||||||
|
fullpath := "/home/jcarr/go/"
|
||||||
|
quickCmd(fullpath, []string{"rm", "-rf", "/home/jcarr/go/src/"})
|
||||||
|
quickCmd(fullpath, []string{"chmod", "700", "-R", "/home/jcarr/go/pkg/"})
|
||||||
|
quickCmd(fullpath, []string{"rm", "-rf", "/home/jcarr/go/pkg/"})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
newCmds = append(newCmds, []string{"cd", "/home/jcarr/"})
|
|
||||||
newCmds = append(newCmds, []string{"rm", "-rf", "go/src/"})
|
|
||||||
newCmds = append(newCmds, []string{"chmod", "700", "-R", "go/pkg/"})
|
|
||||||
newCmds = append(newCmds, []string{"rm", "-rf", "go/pkg/"})
|
|
||||||
if dirty {
|
|
||||||
newCmds = append(newCmds, []string{"can't do this with dirty repos"})
|
|
||||||
} else {
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
})
|
})
|
||||||
buildOptions.NewSeparator("endStatusScans")
|
|
||||||
buildOptions.NewSeparator("endStatusScans")
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,6 +53,9 @@ type autoType struct {
|
||||||
autoWorkingPwd *gadgets.OneLiner
|
autoWorkingPwd *gadgets.OneLiner
|
||||||
|
|
||||||
downloadEverythingButton *gui.Node
|
downloadEverythingButton *gui.Node
|
||||||
|
|
||||||
|
// delete ~/go/src & ~/go/pkg buttons
|
||||||
|
deleteGoSrcPkgB *gui.Node
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue