update turbo-analyze

This commit is contained in:
Motiejus Jakštys 2022-07-11 06:09:46 +03:00
parent 6ae17fe99d
commit aaf9d2cc67

View File

@ -20,10 +20,13 @@ const Header = @import("header.zig").Header;
const section_length_bits = @import("header.zig").section_length_bits; const section_length_bits = @import("header.zig").section_length_bits;
const usage = const usage =
\\usage: turbo-analyze [options] [db.turbo] \\usage: turbo-analyze [OPTION]... <PATH>
\\ \\
\\ -h Print this help message and exit \\Arguments:
\\ [db.turbo] Path to the turbonss database file (default: db.turbo) \\ <PATH> Path to the database (default: /etc/turbonss/db.turbo)
\\
\\Options:
\\ -h Print this help message and exit
\\ \\
; ;
@ -69,7 +72,7 @@ fn execute(
} }
const db_file = switch (myflags.args.len) { const db_file = switch (myflags.args.len) {
0 => "db.turbo", 0 => "/etc/turbonss/db.turbo",
1 => mem.span(myflags.args[0]), 1 => mem.span(myflags.args[0]),
else => { else => {
stderr.print("ERROR: too many arguments\n", .{}) catch {}; stderr.print("ERROR: too many arguments\n", .{}) catch {};