parent
6c5e59073b
commit
36ccb273aa
11
apt.go
11
apt.go
|
@ -24,6 +24,17 @@ func aptGroup(tab *gui.Node) {
|
|||
bash("apt -y install apt-file")
|
||||
bash("apt-file update")
|
||||
})
|
||||
n.AddButton("install base packages", func (*gui.Node) {
|
||||
sudo( func() error {
|
||||
line := "apt install moon-buggy2"
|
||||
err := bash(line)
|
||||
if (err != nil) {
|
||||
gui.ErrorWindow("Error", "Failed to run:\n" + line)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
})
|
||||
})
|
||||
n.AddButton("purge rc-only", func (*gui.Node) {
|
||||
xterm("dpkg -l |grep ^rc | awk '{print $2}' |xargs apt remove --purge -y")
|
||||
})
|
||||
|
|
5
go.mod
5
go.mod
|
@ -5,7 +5,6 @@ go 1.17
|
|||
require (
|
||||
git.wit.org/jcarr/log v0.0.5
|
||||
git.wit.org/wit/gui v0.0.6-0.20211031175754-d38d60bcc38b
|
||||
git.wit.org/wit/shell v0.0.0-20210809053806-ad28138b847a
|
||||
github.com/davecgh/go-spew v1.1.1
|
||||
github.com/getlantern/systray v1.1.0
|
||||
github.com/gobuffalo/packr v1.30.1
|
||||
|
@ -24,14 +23,10 @@ require (
|
|||
github.com/gobuffalo/envy v1.9.0 // indirect
|
||||
github.com/gobuffalo/packd v1.0.0 // indirect
|
||||
github.com/joho/godotenv v1.4.0 // indirect
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
|
||||
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c // indirect
|
||||
github.com/rogpeppe/go-internal v1.8.0 // indirect
|
||||
github.com/sirupsen/logrus v1.8.1 // indirect
|
||||
github.com/svent/go-nbreader v0.0.0-20150201200112-7cef48da76dc // indirect
|
||||
github.com/tmc/scp v0.0.0-20170824174625-f7b48647feef // indirect
|
||||
github.com/wercker/journalhook v0.0.0-20180428041537-5d0a5ae867b3 // indirect
|
||||
golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4 // indirect
|
||||
golang.org/x/image v0.0.0-20211028202545-6944b10bf410 // indirect
|
||||
golang.org/x/sys v0.0.0-20211031064116-611d5d643895 // indirect
|
||||
)
|
||||
|
|
9
go.sum
9
go.sum
|
@ -1,7 +1,5 @@
|
|||
git.wit.org/jcarr/log v0.0.5 h1:PeMbp5s+FMwjPfXc2qUyDuGHostXz9kOjUP3vBSDzpU=
|
||||
git.wit.org/jcarr/log v0.0.5/go.mod h1:rD4mfBZHXgbcFT9Hh4+gGBbWZ/kId2qVnwYUzLhJO6Q=
|
||||
git.wit.org/wit/shell v0.0.0-20210809053806-ad28138b847a h1:6m+E3971o+vg1O9im2QSXbefzF5NcZdLh2jP48cAdbM=
|
||||
git.wit.org/wit/shell v0.0.0-20210809053806-ad28138b847a/go.mod h1:StNrN70kYxjG2IzyBv4fSPB4Pd7yg/YNBNLYtftP+NM=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/andlabs/ui v0.0.0-20200610043537-70a69d6ae31e h1:wSQCJiig/QkoUnpvelSPbLiZNWvh2yMqQTQvIQqSUkU=
|
||||
github.com/andlabs/ui v0.0.0-20200610043537-70a69d6ae31e/go.mod h1:5G2EjwzgZUPnnReoKvPWVneT8APYbyKkihDVAHUi0II=
|
||||
|
@ -53,8 +51,6 @@ github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqx
|
|||
github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg=
|
||||
github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
|
||||
github.com/karrick/godirwalk v1.10.12/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA=
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
|
@ -90,17 +86,12 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
|
|||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/svent/go-nbreader v0.0.0-20150201200112-7cef48da76dc h1:usYkrH2/es/TT7ETdC/qLAagcJPW3EEYFKqvibSnFbA=
|
||||
github.com/svent/go-nbreader v0.0.0-20150201200112-7cef48da76dc/go.mod h1:pPzZl0vMkUhyoxUF8PAGG5bDRGo7PY80oO/PMmpLkkc=
|
||||
github.com/tmc/scp v0.0.0-20170824174625-f7b48647feef h1:7D6Nm4D6f0ci9yttWaKjM1TMAXrH5Su72dojqYGntFY=
|
||||
github.com/tmc/scp v0.0.0-20170824174625-f7b48647feef/go.mod h1:WLFStEdnJXpjK8kd4qKLwQKX/1vrDzp5BcDyiZJBHJM=
|
||||
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
|
||||
github.com/wercker/journalhook v0.0.0-20180428041537-5d0a5ae867b3 h1:shC1HB1UogxN5Ech3Yqaaxj1X/P656PPCB4RbojIJqc=
|
||||
github.com/wercker/journalhook v0.0.0-20180428041537-5d0a5ae867b3/go.mod h1:XCsSkdKK4gwBMNrOCZWww0pX6AOt+2gYc5Z6jBRrNVg=
|
||||
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
|
||||
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4 h1:ydJNl0ENAG67pFbB+9tfhiL2pYqLhfoaZFw/cjLhY4A=
|
||||
golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM=
|
||||
golang.org/x/image v0.0.0-20211028202545-6944b10bf410 h1:hTftEOvwiOq2+O8k2D5/Q7COC7k5Qcrgc2TFURJYnvQ=
|
||||
|
|
11
os.go
11
os.go
|
@ -11,17 +11,6 @@ import "bufio"
|
|||
import "git.wit.org/wit/gui"
|
||||
import "github.com/davecgh/go-spew/spew"
|
||||
|
||||
/*
|
||||
import "time"
|
||||
import "runtime"
|
||||
import "runtime/debug"
|
||||
import "runtime/pprof"
|
||||
|
||||
import "git.wit.org/wit/gui"
|
||||
import "git.wit.org/wit/shell"
|
||||
import "github.com/gobuffalo/packr"
|
||||
*/
|
||||
|
||||
func runSimpleCommand(s string) {
|
||||
cmd := strings.TrimSpace(s) // this is like 'chomp' in perl
|
||||
cmd = strings.TrimSuffix(cmd, "\n") // this is like 'chomp' in perl
|
||||
|
|
Loading…
Reference in New Issue