build/savestdout: delete unused package

Change-Id: I81ac21bd5d457a25f7d591bff41c7cf7e88a4fca
Reviewed-on: https://review.monogon.dev/c/monogon/+/4028
Tested-by: Jenkins CI
Reviewed-by: Leopold Schabel <leo@monogon.tech>
diff --git a/build/savestdout/BUILD.bazel b/build/savestdout/BUILD.bazel
deleted file mode 100644
index 681ef44..0000000
--- a/build/savestdout/BUILD.bazel
+++ /dev/null
@@ -1,14 +0,0 @@
-load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
-
-go_library(
-    name = "savestdout_lib",
-    srcs = ["savestdout.go"],
-    importpath = "source.monogon.dev/build/savestdout",
-    visibility = ["//visibility:private"],
-)
-
-go_binary(
-    name = "savestdout",
-    embed = [":savestdout_lib"],
-    visibility = ["//visibility:public"],
-)
diff --git a/build/savestdout/README.md b/build/savestdout/README.md
deleted file mode 100644
index c6faada..0000000
--- a/build/savestdout/README.md
+++ /dev/null
@@ -1,22 +0,0 @@
-savestdout
-==========
-
-`savestdout` is a small tool to save the stdout of a command to a file, without using
-a shell.
-
-It was made to be used in Bazel rule definitions that want to run a command and save
-its output to stdout without going through `ctx.actions.run\_shell`.
-
-Once [bazelbuild/bazel/issues/5511](https://github.com/bazelbuild/bazel/issues/5511)
-gets fixed, rules that need this behaviour can start using native Bazel functionality
-instead, and this tool should be deleted.
-
-Usage
------
-
-Command line usage:
-
-    bazel build //build/savestdout
-    bazel run bazel-bin/build/savestdout/*/savestdout /tmp/foo ps aux
-
-For an example of use in rules, see `node_initramfs` in `//code/def.bzl`.
diff --git a/build/savestdout/savestdout.go b/build/savestdout/savestdout.go
deleted file mode 100644
index 095f1cf..0000000
--- a/build/savestdout/savestdout.go
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright The Monogon Project Authors.
-// SPDX-License-Identifier: Apache-2.0
-
-package main
-
-import (
-	"errors"
-	"log"
-	"os"
-	"os/exec"
-)
-
-func main() {
-	if len(os.Args) < 3 {
-		log.Fatalf("Usage: %s output_file program <args...>", os.Args[0])
-	}
-
-	f, err := os.Create(os.Args[1])
-	if err != nil {
-		log.Fatalf("Create(%q): %v", os.Args[1], err)
-	}
-	defer f.Close()
-
-	args := os.Args[3:]
-	cmd := exec.Command(os.Args[2], args...)
-	cmd.Stderr = os.Stderr
-	cmd.Stdout = f
-
-	err = cmd.Run()
-	if err == nil {
-		return
-	}
-
-	var e *exec.ExitError
-	if errors.As(err, &e) {
-		os.Exit(e.ExitCode())
-	}
-
-	log.Fatalf("Could not start command: %v", err)
-}