~ciriarte/fml

fb88c0a4e4941b3e0a2db702a73121a3a5cabc58 — Carlos Iriarte 2 months ago 34099d0
feat: detect busybox
1 files changed, 8 insertions(+), 1 deletions(-)

M cmd/fml/cmd/base.go
M cmd/fml/cmd/base.go => cmd/fml/cmd/base.go +8 -1
@@ 104,11 104,18 @@ func untar(r io.Reader) error {
		// check the file type
		switch header.Typeflag {

		// if it's a file create it
		case tar.TypeReg:
			if strings.HasSuffix(header.Name, "os-release") {
				osRelease = fml.GetOSRelease(tr)
			}

		case tar.TypeLink:
			if strings.HasSuffix(header.Name, "busybox") {
				osRelease = fml.OS{
					Name: "busybox",
				}
			}
		}

	}
}