diff --git a/README.md b/README.md index 03d9c8a..b500c3d 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ A project to implement GNU coreutils utilities in `C++` and `Zig`. This is an on - `wc`: Word, line, and byte counting utility - `true`: Do nothing, successfully (exit with status 0) +- `false`: Do nothing, unsuccessfully (exit with status 1) + ## Planned Utilities diff --git a/build.zig b/build.zig index 547f2b1..ce9c3e5 100644 --- a/build.zig +++ b/build.zig @@ -66,6 +66,12 @@ pub fn build(b: *std.Build) void { }, &[_][]const u8{ "src/true", }).build(b, optimize, target, &targets); - + + Executable.init("false", &[_][]const u8{ + "src/false/main.cpp", + }, &[_][]const u8{ + "src/false", + }).build(b, optimize, target, &targets); + zcc.createStep(b, "cdb", targets.toOwnedSlice() catch @panic("OOM")); } diff --git a/src/false/main.cpp b/src/false/main.cpp new file mode 100644 index 0000000..8482dd0 --- /dev/null +++ b/src/false/main.cpp @@ -0,0 +1,3 @@ +int main(void) { + return 1; +} \ No newline at end of file