Skip to content

Commit f84ffe1

Browse files
committed
Only symlink posix prefixes
Fixes #13
1 parent e65843e commit f84ffe1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkgm.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,12 @@ async function mirror_directory(dst: string, src: string, prefix: string) {
212212
}
213213

214214
async function symlink(src: string, dst: string) {
215-
await processEntry(src, dst);
215+
for (const base of ["bin", "sbin", "share", "lib", "libexec", "var", "etc"]) {
216+
const foo = join(src, base);
217+
if (existsSync(foo)) {
218+
await processEntry(foo, join(dst, base));
219+
}
220+
}
216221

217222
async function processEntry(sourcePath: string, targetPath: string) {
218223
const fileInfo = await Deno.lstat(sourcePath);

0 commit comments

Comments
 (0)