You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 30, 2022. It is now read-only.
log.Printf("Paste this into Windows:\n bitsadmin /transfer mydownloadjob /download /priority normal https://storage.googleapis.com/winstrap/%s c:\\users\\wingopher\\Desktop\\winstrap.exe\n", fileName)
homeDir=flag.String("home", defaultHome(), "custom home directory")
39
35
)
40
36
37
+
funcwaitForGo() {
38
+
if!awaitString("go") {
39
+
log.Printf("Canceled.")
40
+
awaitEnter()
41
+
os.Exit(0)
42
+
}
43
+
}
44
+
41
45
funcmain() {
42
46
ifruntime.GOOS!="windows" {
43
47
altMain()
44
48
return
45
49
}
46
50
flag.Parse()
47
51
if!*flagYes {
48
-
log.Printf("This program will install Go, Mingw, Git, etc. Type 'go<enter>' to proceed.")
49
-
if!awaitString("go") {
50
-
log.Printf("Canceled.")
51
-
awaitEnter()
52
-
return
53
-
}
52
+
log.Printf("This program will first download TDM-GCC, Wix, and Git, then let you optinally install Go and do a release.\nType 'go<enter>' to proceed.")
53
+
waitForGo()
54
54
}
55
55
56
56
log.Printf("Downloading files.")
57
-
varwg sync.WaitGroup
57
+
varerrs []chanerror
58
58
forfile, url:=rangefiles {
59
59
if!*release&&file==wixFilename {
60
60
continue
61
61
}
62
-
wg.Add(1)
63
-
godownload(file, url, &wg)
62
+
errc:=make(chanerror)
63
+
errs=append(errs, errc)
64
+
gofunc(file, urlstring) {
65
+
errc<-download(file, url)
66
+
}(file, url)
67
+
}
68
+
varanyErrbool
69
+
for_, errc:=rangeerrs {
70
+
iferr:=<-errc; err!=nil {
71
+
log.Printf("Download error: %v", err)
72
+
anyErr=true
73
+
}
74
+
}
75
+
ifanyErr {
76
+
log.Printf("Download errors. Proceed? Type 'go'")
77
+
waitForGo()
64
78
}
65
-
wg.Wait()
66
79
67
80
checkGit()
68
81
checkGcc()
69
82
83
+
log.Printf("This program will now check out go. Type 'go' to proceed.")
84
+
waitForGo()
85
+
70
86
checkoutGo()
71
87
88
+
log.Printf("This program will now compile Go for 386 and amd64. Type 'go' to proceed.")
0 commit comments