mirror of
https://github.com/zhom/donutbrowser.git
synced 2026-04-24 12:56:31 +02:00
15 lines
400 B
JavaScript
15 lines
400 B
JavaScript
import { execSync } from "child_process";
|
|
import fs from "fs";
|
|
|
|
const ext = process.platform === "win32" ? ".exe" : "";
|
|
|
|
const rustInfo = execSync("rustc -vV");
|
|
const targetTriple = /host: (\S+)/g.exec(rustInfo)[1];
|
|
if (!targetTriple) {
|
|
console.error("Failed to determine platform target triple");
|
|
}
|
|
fs.renameSync(
|
|
`dist/nodecar${ext}`,
|
|
`../src-tauri/binaries/nodecar-${targetTriple}${ext}`
|
|
);
|