mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2025-03-04 18:59:58 +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 = .{
|
.dependencies = .{
|
||||||
.znvim = .{
|
.znvim = .{
|
||||||
.url = "https://github.com/LordMZTE/znvim/archive/0a55798f24e084faef68e93f180683157a417639.tar.gz",
|
.url = "https://mzte.de/git/LordMZTE/znvim/archive/0a55798f24e084faef68e93f180683157a417639.tar.gz",
|
||||||
.hash = "1220489beca4ac48804ddfbe85b158a49ee2ceb4bbd98fc03e76f18ec01517f5521a",
|
.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);
|
var files = std.ArrayList([]const u8).init(alloc);
|
||||||
defer files.deinit();
|
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, .{});
|
var dir = try std.fs.cwd().openIterableDir(path, .{});
|
||||||
defer dir.close();
|
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 });
|
const entry_path = try std.fs.path.join(build_alloc, &.{ path, entry.path });
|
||||||
|
|
||||||
switch (entry.kind) {
|
switch (entry.kind) {
|
||||||
.File => {
|
.file => {
|
||||||
if (std.mem.endsWith(u8, entry.path, ".lua") or
|
if (std.mem.endsWith(u8, entry.path, ".lua") or
|
||||||
std.mem.endsWith(u8, entry.path, ".fnl"))
|
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 idx: c_int = 1;
|
||||||
var iter = jvmdir.iterate();
|
var iter = jvmdir.iterate();
|
||||||
while (try iter.next()) |jvm| {
|
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;
|
continue;
|
||||||
|
|
||||||
for (runtime_map) |rt| {
|
for (runtime_map) |rt| {
|
||||||
|
@ -107,7 +107,7 @@ fn lGetBundleInfo(l: *c.lua_State) !c_int {
|
||||||
var iter = dir.iterate();
|
var iter = dir.iterate();
|
||||||
var idx: c_int = 1;
|
var idx: c_int = 1;
|
||||||
while (try iter.next()) |f| {
|
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;
|
continue;
|
||||||
|
|
||||||
if (!has_fernflower and std.mem.containsAtLeast(u8, f.name, 1, "fernflower"))
|
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();
|
var iter = dir.iterate();
|
||||||
while (try iter.next()) |e| {
|
while (try iter.next()) |e| {
|
||||||
switch (e.kind) {
|
switch (e.kind) {
|
||||||
.File => {
|
.file => {
|
||||||
const path = try dir.dir.realpathAlloc(self.filename_arena.allocator(), e.name);
|
const path = try dir.dir.realpathAlloc(self.filename_arena.allocator(), e.name);
|
||||||
try self.files.append(path);
|
try self.files.append(path);
|
||||||
},
|
},
|
||||||
.Directory => {
|
.directory => {
|
||||||
var subdir = try dir.dir.openIterableDir(e.name, .{});
|
var subdir = try dir.dir.openIterableDir(e.name, .{});
|
||||||
defer subdir.close();
|
defer subdir.close();
|
||||||
try self.walk(subdir);
|
try self.walk(subdir);
|
||||||
},
|
},
|
||||||
.SymLink => {
|
.sym_link => {
|
||||||
const p = try dir.dir.readLink(e.name, &self.buf);
|
const p = try dir.dir.readLink(e.name, &self.buf);
|
||||||
var subdir = dir.dir.openIterableDir(p, .{}) catch |err| {
|
var subdir = dir.dir.openIterableDir(p, .{}) catch |err| {
|
||||||
switch (err) {
|
switch (err) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue