local-etc-hosts-updater/src/main.zig

12 lines
302 B
Zig
Raw Normal View History

2024-05-10 11:54:16 +05:00
const std = @import("std");
2024-05-10 12:49:51 +05:00
const util = @import("util.zig");
const mdns = @import("mdns.zig");
const hosts = @import("hosts.zig");
2024-05-10 11:54:16 +05:00
pub fn main() !void {
2024-05-10 12:49:51 +05:00
try util.check_perms();
const domain = try util.get_input();
const ips = try mdns.get_mdns(domain);
try hosts.update_hosts(ips);
2024-05-10 11:54:16 +05:00
}