updater
This commit is contained in:
parent
38d3481f8d
commit
1010c6586a
12
app/nose/bin/update.ts
Normal file
12
app/nose/bin/update.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import { $ } from "bun"
|
||||
|
||||
export default async function () {
|
||||
const { stdout } = await $`cd .. && git pull`.quiet()
|
||||
const out = stdout.toString()
|
||||
if (/up to date/.test(out)) {
|
||||
return "Up to date."
|
||||
} else {
|
||||
setTimeout(() => process.exit(), 1000)
|
||||
return "Restarting in 1 second..."
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user