| ... | ... | @@ -34,20 +34,20 @@ pub const DepType = enum { |
| 34 | 34 | switch (self) { |
| 35 | 35 | .system_lib => {}, |
| 36 | 36 | .git => { |
| 37 | | _ = try u.run_cmd(null, &.{ "git", "clone", "--recurse-submodules", rpath, dpath }); |
| 37 | u.assert((try u.run_cmd(null, &.{ "git", "clone", "--recurse-submodules", rpath, dpath })) == 0, "git clone {s} failed", .{rpath}); |
| 38 | 38 | }, |
| 39 | 39 | .hg => { |
| 40 | | _ = try u.run_cmd(null, &.{ "hg", "clone", rpath, dpath }); |
| 40 | u.assert((try u.run_cmd(null, &.{ "hg", "clone", rpath, dpath })) == 0, "hg clone {s} failed", .{rpath}); |
| 41 | 41 | }, |
| 42 | 42 | .http => { |
| 43 | 43 | try std.fs.cwd().makePath(dpath); |
| 44 | | _ = try u.run_cmd(dpath, &.{ "wget", rpath }); |
| 44 | u.assert((try u.run_cmd(dpath, &.{ "wget", rpath })) == 0, "wget {s} failed", .{rpath}); |
| 45 | 45 | const f = rpath[std.mem.lastIndexOf(u8, rpath, "/").? + 1 ..]; |
| 46 | 46 | if (std.mem.endsWith(u8, f, ".zip")) { |
| 47 | | _ = try u.run_cmd(dpath, &.{ "unzip", f, "-d", "." }); |
| 47 | u.assert((try u.run_cmd(dpath, &.{ "unzip", f, "-d", "." })) == 0, "unzip {s} failed", .{f}); |
| 48 | 48 | } |
| 49 | 49 | if (std.mem.endsWith(u8, f, ".tar") or std.mem.endsWith(u8, f, ".tar.gz") or std.mem.endsWith(u8, f, ".tar.xz") or std.mem.endsWith(u8, f, ".tar.zst")) { |
| 50 | | _ = try u.run_cmd(dpath, &.{ "tar", "-xf", f, "-C", "." }); |
| 50 | u.assert((try u.run_cmd(dpath, &.{ "tar", "-xf", f, "-C", "." })) == 0, "un-tar {s} failed", .{f}); |
| 51 | 51 | } |
| 52 | 52 | }, |
| 53 | 53 | } |
| ... | ... | @@ -57,11 +57,11 @@ pub const DepType = enum { |
| 57 | 57 | switch (self) { |
| 58 | 58 | .system_lib => {}, |
| 59 | 59 | .git => { |
| 60 | | _ = try u.run_cmd(dpath, &.{ "git", "fetch" }); |
| 61 | | _ = try u.run_cmd(dpath, &.{ "git", "pull" }); |
| 60 | u.assert((try u.run_cmd(dpath, &.{ "git", "fetch" })) == 0, "git fetch failed", .{}); |
| 61 | u.assert((try u.run_cmd(dpath, &.{ "git", "pull" })) == 0, "git pull failed", .{}); |
| 62 | 62 | }, |
| 63 | 63 | .hg => { |
| 64 | | _ = try u.run_cmd(dpath, &.{ "hg", "pull" }); |
| 64 | u.assert((try u.run_cmd(dpath, &.{ "hg", "pull" })) == 0, "hg pull failed", .{}); |
| 65 | 65 | }, |
| 66 | 66 | .http => { |
| 67 | 67 | // |