parent
0950bb4ef8
commit
d259bd2ccd
1
Makefile
1
Makefile
|
@ -6,6 +6,7 @@ VERSION = $(shell cat resources/VERSION)
|
|||
# PATH=/usr/bin:$PATH go version
|
||||
|
||||
build:
|
||||
git pull
|
||||
# reset
|
||||
GO111MODULE="off" go build -v
|
||||
./wit-new-machine
|
||||
|
|
|
@ -1,20 +1,17 @@
|
|||
deb http://mirrors.wit.org/debian/ sid main contrib non-free
|
||||
deb-src http://mirrors.wit.org/debian/ sid main contrib non-free
|
||||
# deb http://mirrors.wit.org/debian/ sid main contrib non-free
|
||||
# deb-src http://mirrors.wit.org/debian/ sid main contrib non-free
|
||||
|
||||
# deb http://deb.debian.org/debian experimental main
|
||||
# apt -t experimental install xrandr
|
||||
|
||||
<<<<<<< HEAD
|
||||
# INFO: http://deb.debian.org/
|
||||
# NO_PUBKEY 5A88D659DCB811BB
|
||||
# deprecated: apt-key adv --keyserver keyring.debian.org --recv-keys 5A88D659DCB811BB
|
||||
# use: apt install debian-ports-archive-keyring
|
||||
deb http://deb.debian.org/debian unstable main contrib non-free
|
||||
deb http://deb.debian.org/debian-debug unstable-debug main contrib non-free
|
||||
deb http://deb.debian.org/debian-ports unstable main contrib non-free
|
||||
# deb http://deb.debian.org/debian unstable main contrib non-free
|
||||
# deb http://deb.debian.org/debian-debug unstable-debug main contrib non-free
|
||||
# deb http://deb.debian.org/debian-ports unstable main contrib non-free
|
||||
|
||||
=======
|
||||
>>>>>>> 90a3833 (APT: add files for apt)
|
||||
###################### apt fallback to cogentco.com ###########################
|
||||
#deb http://mirror.cogentco.com/debian/ sid main contrib non-free
|
||||
#deb-src http://mirror.cogentco.com/debian/ sid main contrib non-free
|
||||
|
|
|
@ -35,6 +35,11 @@ var padding *gui.Node
|
|||
var firefox *gui.Node
|
||||
var resolv *gui.Node
|
||||
|
||||
func writeRes(indir string, outdir string, name string) {
|
||||
tmp, _ := res.ReadFile(indir + name)
|
||||
ioutil.WriteFile(outdir + name, tmp, 0644)
|
||||
}
|
||||
|
||||
func mainTab(n *gui.Node) {
|
||||
var g *gui.Node
|
||||
|
||||
|
@ -56,7 +61,18 @@ func mainTab(n *gui.Node) {
|
|||
rn := newTab.NewGroup("Local Linux Settings")
|
||||
|
||||
rn.NewButton("apt sources", func () {
|
||||
xterm("cd ~/jcarr/setup; make setup-apt-sources; make setup-apt-file")
|
||||
if _, err := os.Stat("/etc/apt/sources.list.d/wit.list"); err == nil {
|
||||
log.Println("apt sources are already configured")
|
||||
} else {
|
||||
myGui.CloseToolkit("gocui")
|
||||
writeRes("resources/", "/etc/", "apt/sources.list")
|
||||
writeRes("resources/", "/etc/", "apt/sources.list.d/wit.list")
|
||||
writeRes("resources/", "/etc/", "apt/sources.list.d/debian.list")
|
||||
doCmd("apt update")
|
||||
doCmd("apt dist-upgrade")
|
||||
log.Println("\nYou should reboot now\n")
|
||||
os.Exit(0)
|
||||
}
|
||||
})
|
||||
rn.NewButton("apt update", func () {
|
||||
myGui.CloseToolkit("gocui")
|
||||
|
@ -96,8 +112,9 @@ func mainTab(n *gui.Node) {
|
|||
if _, err := os.Stat("/etc/default/grub.d/wit.cfg"); err == nil {
|
||||
log.Println("Grub is already configured")
|
||||
} else {
|
||||
grub, _ := res.ReadFile("resources/grub.d/wit.cfg")
|
||||
ioutil.WriteFile("/etc/default/grub.d/wit.cfg", grub, 0644)
|
||||
writeRes("resources/", "/etc/default/", "grub.d/wit.cfg")
|
||||
// grub, _ := res.ReadFile("resources/grub.d/wit.cfg")
|
||||
// ioutil.WriteFile("/etc/default/grub.d/wit.cfg", grub, 0644)
|
||||
doCmd("update-grub")
|
||||
}
|
||||
os.Exit(0)
|
||||
|
|
Loading…
Reference in New Issue