logo

deblob

remove binary executables from a directory git clone https://hacktivis.me/git/deblob.git
commit: fe08f69e3eec4eaff1b0c4783cd3b544f3554258
parent 7d35c5b427520f2d944f877a4b19b771ae908944
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu, 23 Jun 2022 09:12:00 +0200

Add support for Erlang BEAM files

Diffstat:

Mdeblob.12++
Mmain.ha4+++-
Atest/fixtures/Elixir.Hex.API.Auth.beam0
3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/deblob.1 b/deblob.1 @@ -41,6 +41,8 @@ ELF files by the magic-header files by the magic-header .It x86 IBM PC BIOS Option Rom +.It +Erlang BEAM files .El .Sh EXAMPLES The following code block show how it is intended to be used in Gentoo's diff --git a/main.ha b/main.ha @@ -18,6 +18,7 @@ const magic: [_]str = [ "\x7FELF", "!<arch>\n", "\x55\xAA", + "FOR1", ]; fn is_blob(filename: str) (bool | fs::error | io::error) = { @@ -48,6 +49,7 @@ fn is_blob(filename: str) (bool | fs::error | io::error) = { ("test/fixtures/hello", true), ("test/fixtures/hello.o", true), ("test/fixtures/hello.a", true), + ("test/fixtures/Elixir.Hex.API.Auth.beam", true), //("test/fixtures/option.rom", true), ]; @@ -167,7 +169,7 @@ fn check_dir(dirname: str, ignoring: bool) (void | errors::invalid) = { }; assert(len(files_after) == 5); - assert(len(files_before) == 8); + assert(len(files_before) == 9); }; export fn main() void = { diff --git a/test/fixtures/Elixir.Hex.API.Auth.beam b/test/fixtures/Elixir.Hex.API.Auth.beam Binary files differ.