ev: add script ensuring standard files across subprojects
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
f0d483507b
commit
1c4f4e4c90
1 changed files with 28 additions and 0 deletions
28
dev/ensure-standard-files.zig
Normal file
28
dev/ensure-standard-files.zig
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
//! Usage: zig run ./dev/ensure-standard-files.zig
|
||||||
|
|
||||||
|
const std = @import("std");
|
||||||
|
|
||||||
|
const dirs = [_][]const u8{
|
||||||
|
".",
|
||||||
|
"basisu",
|
||||||
|
"ecs",
|
||||||
|
"freetype",
|
||||||
|
"gamemode",
|
||||||
|
"glfw",
|
||||||
|
"gpu",
|
||||||
|
"gpu-dawn",
|
||||||
|
"sysaudio",
|
||||||
|
"sysjs",
|
||||||
|
};
|
||||||
|
|
||||||
|
pub fn main() !void {
|
||||||
|
inline for (dirs) |dir| {
|
||||||
|
copyFile("dev/template/LICENSE", dir ++ "/LICENSE");
|
||||||
|
copyFile("dev/template/LICENSE-MIT", dir ++ "/LICENSE-MIT");
|
||||||
|
copyFile("dev/template/LICENSE-APACHE", dir ++ "/LICENSE-APACHE");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn copyFile(src_path: []const u8, dst_path: []const u8) void {
|
||||||
|
std.fs.cwd().copyFile(src_path, std.fs.cwd(), dst_path, .{}) catch unreachable;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue