mirror of https://github.com/NvChad/NvChad
implemented install script
parent
5df264369d
commit
77d1ff2024
@ -1,6 +1,6 @@
|
||||
{
|
||||
"tasks": {
|
||||
"generate": "./scripts/generate ./colors/vscode.yml > ./colors/vscode",
|
||||
"install": "deno run --allow-write=~/.config/nvim scripts/install.ts"
|
||||
"install": "deno run --allow-env=HOME --allow-run=git,rm --allow-write=$HOME/.config/nvim scripts/install.ts"
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
#!/usr/bin/sh
|
||||
|
||||
|
||||
git commit -am ".."
|
||||
rm -rf ~/.config/nvim
|
||||
git clone $(dirname $0) ~/.config/nvim
|
@ -0,0 +1,23 @@
|
||||
|
||||
|
||||
const SRC=new URL("../",import.meta.url).pathname;
|
||||
const DEST=`${Deno.env.get("HOME")}/.config/nvim`;
|
||||
|
||||
async function main() {
|
||||
await run(`rm -rf ${DEST}`);
|
||||
await run(`git clone ${SRC} ${DEST}`);
|
||||
}
|
||||
|
||||
async function run(cmd: string) {
|
||||
// deno-lint-ignore no-deprecated-deno-api
|
||||
const process=Deno.run({
|
||||
cmd: cmd.split(" "),
|
||||
stdout: "piped"
|
||||
});
|
||||
console.log(process.stdout);
|
||||
|
||||
return (await process.status()).code;
|
||||
}
|
||||
|
||||
|
||||
if(import.meta.main) await main();
|
Loading…
Reference in New Issue