diff options
| author | Isaac Freund <ifreund@ifreund.xyz> | 2020-12-30 20:29:28 +0100 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2020-12-30 20:29:28 +0100 |
| commit | c7bc47d6d4ca11ad0cc3a0216b8e45d232fc30fa (patch) | |
| tree | ac7e494a2a3dbedfe0aefd64db15b4f7c6c417c9 /build.zig | |
| parent | ba9df864729c7ffba6171ce7be5eb0e91399e6da (diff) | |
| download | river-c7bc47d6d4ca11ad0cc3a0216b8e45d232fc30fa.tar.gz river-c7bc47d6d4ca11ad0cc3a0216b8e45d232fc30fa.tar.xz | |
build: install example config to /etc/river/init
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -27,6 +27,14 @@ pub fn build(b: *zbs.Builder) !void { const examples = b.option(bool, "examples", "Set to true to build examples") orelse false; + // Sigh, why are the conventions inconsistent like this. + const resolved_prefix = try std.fs.path.resolve(b.allocator, &[_][]const u8{b.install_prefix.?}); + if (std.mem.eql(u8, resolved_prefix, "/usr")) { + b.installFile("example/init", "../etc/river/init"); + } else { + b.installFile("example/init", "etc/river/init"); + } + const scanner = ScanProtocolsStep.create(b); scanner.addSystemProtocol("stable/xdg-shell/xdg-shell.xml"); scanner.addProtocolPath("protocol/river-control-unstable-v1.xml"); |
