mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-12-13 01:22:57 +01:00
update scripts to latest zig
This commit is contained in:
parent
a87b656cca
commit
f709ea6ffa
4 changed files with 8 additions and 8 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
.dependencies = .{
|
||||
.znvim = .{
|
||||
.url = "https://github.com/LordMZTE/znvim/archive/0a55798f24e084faef68e93f180683157a417639.tar.gz",
|
||||
.url = "https://mzte.de/git/LordMZTE/znvim/archive/0a55798f24e084faef68e93f180683157a417639.tar.gz",
|
||||
.hash = "1220489beca4ac48804ddfbe85b158a49ee2ceb4bbd98fc03e76f18ec01517f5521a",
|
||||
},
|
||||
},
|
||||
|
|
|
@ -75,7 +75,7 @@ pub fn doCompile(path: []const u8, alloc: std.mem.Allocator) !void {
|
|||
var files = std.ArrayList([]const u8).init(alloc);
|
||||
defer files.deinit();
|
||||
|
||||
if ((try std.fs.cwd().statFile(path)).kind == .Directory) {
|
||||
if ((try std.fs.cwd().statFile(path)).kind == .directory) {
|
||||
var dir = try std.fs.cwd().openIterableDir(path, .{});
|
||||
defer dir.close();
|
||||
|
||||
|
@ -86,7 +86,7 @@ pub fn doCompile(path: []const u8, alloc: std.mem.Allocator) !void {
|
|||
const entry_path = try std.fs.path.join(build_alloc, &.{ path, entry.path });
|
||||
|
||||
switch (entry.kind) {
|
||||
.File => {
|
||||
.file => {
|
||||
if (std.mem.endsWith(u8, entry.path, ".lua") or
|
||||
std.mem.endsWith(u8, entry.path, ".fnl"))
|
||||
{
|
||||
|
|
|
@ -44,7 +44,7 @@ fn lFindRuntimes(l: *c.lua_State) !c_int {
|
|||
var idx: c_int = 1;
|
||||
var iter = jvmdir.iterate();
|
||||
while (try iter.next()) |jvm| {
|
||||
if (jvm.kind != .Directory or !std.mem.startsWith(u8, jvm.name, "java-"))
|
||||
if (jvm.kind != .directory or !std.mem.startsWith(u8, jvm.name, "java-"))
|
||||
continue;
|
||||
|
||||
for (runtime_map) |rt| {
|
||||
|
@ -107,7 +107,7 @@ fn lGetBundleInfo(l: *c.lua_State) !c_int {
|
|||
var iter = dir.iterate();
|
||||
var idx: c_int = 1;
|
||||
while (try iter.next()) |f| {
|
||||
if (f.kind != .File or !std.mem.endsWith(u8, f.name, ".jar"))
|
||||
if (f.kind != .file or !std.mem.endsWith(u8, f.name, ".jar"))
|
||||
continue;
|
||||
|
||||
if (!has_fernflower and std.mem.containsAtLeast(u8, f.name, 1, "fernflower"))
|
||||
|
|
|
@ -22,16 +22,16 @@ pub fn walk(self: *Self, dir: std.fs.IterableDir) anyerror!void {
|
|||
var iter = dir.iterate();
|
||||
while (try iter.next()) |e| {
|
||||
switch (e.kind) {
|
||||
.File => {
|
||||
.file => {
|
||||
const path = try dir.dir.realpathAlloc(self.filename_arena.allocator(), e.name);
|
||||
try self.files.append(path);
|
||||
},
|
||||
.Directory => {
|
||||
.directory => {
|
||||
var subdir = try dir.dir.openIterableDir(e.name, .{});
|
||||
defer subdir.close();
|
||||
try self.walk(subdir);
|
||||
},
|
||||
.SymLink => {
|
||||
.sym_link => {
|
||||
const p = try dir.dir.readLink(e.name, &self.buf);
|
||||
var subdir = dir.dir.openIterableDir(p, .{}) catch |err| {
|
||||
switch (err) {
|
||||
|
|
Loading…
Reference in a new issue