Skip to content

Commit 87c0fd3

Browse files
committed
F some
1 parent 76225a8 commit 87c0fd3

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

brewkit/fixups/fix-shebang.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ export default async function (path: Path, provided_programs: string[]) {
7575
"color:yellow",
7676
"rewriting shebang:",
7777
path,
78+
"from",
79+
line0,
7880
"to",
7981
shebang,
8082
);

brewkit/unarchive.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
import { fromFileUrl, basename } from "jsr:@std/path@1";
22
import { active_pkg, Path } from "brewkit";
3+
import { crc32 } from "https://deno.land/x/crc32/mod.ts";
4+
35

46
export default async function (
5-
url: string, opts: {
6-
stripComponents: number | undefined,
7-
cache: boolean
8-
} = {
9-
stripComponents: url.endsWith(".zip") ? undefined : 1,
10-
cache: true
11-
}
7+
url: string,
8+
stripComponents = url.endsWith(".zip") ? undefined : 1,
129
): Promise<void> {
1310
console.error("%c+", "color:yellow", "unarchiving:", url);
1411

1512
const root = new Path(fromFileUrl(import.meta.url)).join("../../srcs");
1613
const ext = Path.root.join(basename(url)).extname();
17-
const predownloaded_file = root.join(active_pkg!.project).mkdir("p").join(`v${active_pkg!.version}${ext}`);
14+
const checksum = crc32(url);
15+
const predownloaded_file = root.join(active_pkg!.project).mkdir("p").join(`v${active_pkg!.version}_${checksum}${ext}`);
1816

1917
const input = await (async () => {
2018
if (!predownloaded_file.isFile()) {
@@ -39,7 +37,7 @@ export default async function (
3937
})();
4038

4139
if (!url.endsWith(".zip")) {
42-
const [cmd, ...args] = mktar(url, opts.stripComponents);
40+
const [cmd, ...args] = mktar(url, stripComponents);
4341
const tar = new Deno.Command(cmd, {
4442
args: args,
4543
stdin: "piped",

deno.lock

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)