@@ -13,16 +13,16 @@ const viz_network = @import("viz_network.html.zig").viz_network;
1313const usage =
1414 \\usage: zigpkg <subcommand> [--help]
1515 \\
16- \\stores all dependencies of a directory containing build.zig.zon in a .tar.gz archive
16+ \\a multicall too to work with zig's build graphs
1717 \\
1818 \\available subcommands:
1919 \\ dot rerun "zig build" and output a graphviz ".dot" file of build steps based on args
2020 \\ dotall rerun "zig build" and output a graphviz ".dot" file of all build steps
2121 \\ dothtml "dotall", but output html for vis.js instead of ".dit"
2222 \\ zon rerun "zig build" with a custom build runner and output the build graph as .zon to stdout
2323 \\ json same as "zon" but output json
24- \\ deppkg more subcommands for creating and working with "deppkg.tar.gz" files storing all
25- \\ dependencies required to build a zig package
24+ \\ deppkg more subcommands for creating and working with "deppkg.tar.gz" files. storing all
25+ \\ stores all dependencies of a directory containing build.zig.zon in a .tar.gz archive
2626 \\
2727 \\environment variables:
2828 \\
@@ -205,14 +205,21 @@ pub fn cmd_extract(opt: GlobalOptions, args: []const []const u8) !u8 {
205205
206206pub fn cmd_create (opt : GlobalOptions , args : []const []const u8 ) ! u8 {
207207 const cmd_usage =
208+ \\
208209 \\usage: zigpkg create <deppkg.tar.gz> <<build root path>|--> [z]
209210 \\
211+ \\
210212 ;
211213 if (args .len < 1 ) {
212214 try opt .stdout .writeAll (cmd_usage );
213215 return 1 ;
214216 }
215217
218+ if (helpArg (args [0.. @min (1 , args .len )])) {
219+ try opt .stdout .writeAll (cmd_usage );
220+ return 1 ;
221+ }
222+
216223 const output = try std .fs .path .resolve (opt .gpa , &.{ opt .cwd , args [0 ] });
217224 defer opt .gpa .free (output );
218225
0 commit comments