Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f1ff226c authored by Elliott Hughes's avatar Elliott Hughes
Browse files

Switch most of the darwin tools to toybox.

Bug: http://b/139450866
Test: treehugger
Test: "works for me on my machine" (last week)
Change-Id: I5dd00e6fda134b06967651007afb7565ce4f9e24
parent 80f8d8cd
Loading
Loading
Loading
Loading
+9 −53
Original line number Original line Diff line number Diff line
@@ -118,63 +118,19 @@ var Configuration = map[string]PathConfig{
	"ld.gold":    Forbidden,
	"ld.gold":    Forbidden,
	"pkg-config": Forbidden,
	"pkg-config": Forbidden,


	// On Linux we'll use the toybox versions of these instead.
	// These are currently Linux-only toybox tools (but can be switched now).
	"basename": LinuxOnlyPrebuilt,
	"cat":      LinuxOnlyPrebuilt,
	"chmod":    LinuxOnlyPrebuilt,
	"cmp":      LinuxOnlyPrebuilt,
	"cp":       LinuxOnlyPrebuilt,
	"comm":     LinuxOnlyPrebuilt,
	"cut":      LinuxOnlyPrebuilt,
	"date": LinuxOnlyPrebuilt,
	"date": LinuxOnlyPrebuilt,
	"dirname":  LinuxOnlyPrebuilt,
	"stat": LinuxOnlyPrebuilt,
	"du":       LinuxOnlyPrebuilt,

	"echo":     LinuxOnlyPrebuilt,
	// These are toybox tools that only work on Linux.
	"egrep":    LinuxOnlyPrebuilt,
	"env":      LinuxOnlyPrebuilt,
	"getconf":  LinuxOnlyPrebuilt,
	"grep":     LinuxOnlyPrebuilt,
	"head":     LinuxOnlyPrebuilt,
	"hostname": LinuxOnlyPrebuilt,
	"id":       LinuxOnlyPrebuilt,
	"ln":       LinuxOnlyPrebuilt,
	"ls":       LinuxOnlyPrebuilt,
	"mkdir":    LinuxOnlyPrebuilt,
	"mktemp":   LinuxOnlyPrebuilt,
	"mv":       LinuxOnlyPrebuilt,
	"od":       LinuxOnlyPrebuilt,
	"paste":    LinuxOnlyPrebuilt,
	"pgrep": LinuxOnlyPrebuilt,
	"pgrep": LinuxOnlyPrebuilt,
	"pkill": LinuxOnlyPrebuilt,
	"pkill": LinuxOnlyPrebuilt,
	"ps":    LinuxOnlyPrebuilt,
	"ps":    LinuxOnlyPrebuilt,
	"pwd":      LinuxOnlyPrebuilt,
	"readlink": LinuxOnlyPrebuilt,
	"rm":       LinuxOnlyPrebuilt,
	"rmdir":    LinuxOnlyPrebuilt,
	"sed":      LinuxOnlyPrebuilt,
	"seq":      LinuxOnlyPrebuilt,
	"setsid":   LinuxOnlyPrebuilt,
	"sleep":    LinuxOnlyPrebuilt,
	"sort":     LinuxOnlyPrebuilt,
	"stat":     LinuxOnlyPrebuilt,
	"tail":     LinuxOnlyPrebuilt,
	"tar":      LinuxOnlyPrebuilt,
	"tee":      LinuxOnlyPrebuilt,
	"timeout":  LinuxOnlyPrebuilt,
	"touch":    LinuxOnlyPrebuilt,
	"true":     LinuxOnlyPrebuilt,
	"uname":    LinuxOnlyPrebuilt,
	"uniq":     LinuxOnlyPrebuilt,
	"unix2dos": LinuxOnlyPrebuilt,
	"wc":       LinuxOnlyPrebuilt,
	"whoami":   LinuxOnlyPrebuilt,
	"which":    LinuxOnlyPrebuilt,
	"xargs":    LinuxOnlyPrebuilt,
	"xxd":      LinuxOnlyPrebuilt,
}
}


func init() {
func init() {
	if runtime.GOOS == "darwin" {
	if runtime.GOOS == "darwin" {
		// TODO: move Darwin off md5 and onto our md5sum prebuilt.
		Configuration["md5"] = Allowed
		Configuration["md5"] = Allowed
		Configuration["sw_vers"] = Allowed
		Configuration["sw_vers"] = Allowed
		Configuration["xcrun"] = Allowed
		Configuration["xcrun"] = Allowed