@@ -55,39 +55,39 @@ func InstallRelayBinary() {
55
55
56
56
// Check for and remove existing binary
57
57
// When developing comment to prevent unecessary builds
58
- // err = os.Remove(fmt.Sprintf("%s/%s", destDir, binaryName))
59
- // if err != nil && !os.IsNotExist(err) {
60
- // log.Fatalf("Error removing existing binary: %v", err)
61
- // }
58
+ err = os .Remove (fmt .Sprintf ("%s/%s" , destDir , binaryName ))
59
+ if err != nil && ! os .IsNotExist (err ) {
60
+ log .Fatalf ("Error removing existing binary: %v" , err )
61
+ }
62
62
63
63
// Check if binary exists
64
64
// When developing uncomment to prevent unecessary builds
65
- _ , err = os .Stat (fmt .Sprintf ("%s/%s" , destDir , binaryName ))
66
- if os .IsNotExist (err ) {
67
- // Intialize and update git submodule
68
- err = exec .Command ("git" , "-C" , fmt .Sprintf ("%s" , tempDir ), "submodule" , "update" , "--init" ).Run ()
69
- if err != nil {
70
- log .Fatalf ("Error initializing and updating git submodule: %v" , err )
71
- }
72
-
73
- // Make setup-golpe
74
- err = exec .Command ("make" , "-C" , fmt .Sprintf ("%s" , tempDir ), "setup-golpe" ).Run ()
75
- if err != nil {
76
- log .Fatalf ("Error making setup-golpe: %v" , err )
77
- }
78
-
79
- // Make -j2
80
- err = exec .Command ("make" , "-C" , fmt .Sprintf ("%s" , tempDir ), "-j2" ).Run ()
81
- if err != nil {
82
- log .Fatalf ("Error making -j2: %v" , err )
83
- }
84
-
85
- // Install
86
- err = exec .Command ("mv" , fmt .Sprintf ("%s/strfry" , tempDir ), fmt .Sprintf ("%s/%s" , destDir , binaryName )).Run ()
87
- if err != nil {
88
- log .Fatalf ("Error installing binary: %v" , err )
89
- }
65
+ // _, err = os.Stat(fmt.Sprintf("%s/%s", destDir, binaryName))
66
+ // if os.IsNotExist(err) {
67
+ // Intialize and update git submodule
68
+ err = exec .Command ("git" , "-C" , fmt .Sprintf ("%s" , tempDir ), "submodule" , "update" , "--init" ).Run ()
69
+ if err != nil {
70
+ log .Fatalf ("Error initializing and updating git submodule: %v" , err )
71
+ }
72
+
73
+ // Make setup-golpe
74
+ err = exec .Command ("make" , "-C" , fmt .Sprintf ("%s" , tempDir ), "setup-golpe" ).Run ()
75
+ if err != nil {
76
+ log .Fatalf ("Error making setup-golpe: %v" , err )
90
77
}
91
78
79
+ // Make -j2
80
+ err = exec .Command ("make" , "-C" , fmt .Sprintf ("%s" , tempDir ), "-j2" ).Run ()
81
+ if err != nil {
82
+ log .Fatalf ("Error making -j2: %v" , err )
83
+ }
84
+
85
+ // Install
86
+ err = exec .Command ("mv" , fmt .Sprintf ("%s/strfry" , tempDir ), fmt .Sprintf ("%s/%s" , destDir , binaryName )).Run ()
87
+ if err != nil {
88
+ log .Fatalf ("Error installing binary: %v" , err )
89
+ }
90
+ // }
91
+
92
92
spinner .Success ("strfry relay installed successfully." )
93
93
}
0 commit comments