diff --git a/README.md b/README.md index 2944ab4..a6d7cb2 100644 --- a/README.md +++ b/README.md @@ -184,7 +184,7 @@ Options: ``` ### [update.js](./scripts/update.js) -**RAM:** 2.95 GB +**RAM:** 2.65 GB Download the latest script updates from the repository using wget. ``` @@ -194,13 +194,14 @@ Running script with 1 thread(s), pid 1 and args: ["--help"]. Download the latest script updates from the repository using wget. -Usage: run update.js [OPTIONS] [SKIP] +Usage: run update.js [OPTIONS] [DEVICE] run update.js --help - SKIP Skip updating self (for debugging) + DEVICE Device to update, defaults to current machine Options: - -d --device Device to update, defaults to current machine + --skip-self Skip updating self (for debugging & used internally) + --no-banner Hide the banner (Used internally) -h --help Display this help message ``` diff --git a/scripts/update.js b/scripts/update.js index 59dfc5c..fc6f717 100644 --- a/scripts/update.js +++ b/scripts/update.js @@ -136,7 +136,8 @@ export async function main(ns) { 'miner.js', 'network-graph.js', 'node-manager.js', - 'rootkit.js' + 'rootkit.js', + 'vanguard.js' ]; let args; try { @@ -160,7 +161,7 @@ export async function main(ns) { await downloadPrint(ns, `${dest}${updateFile}`); ns.tprint(''); await slowPrint(ns, 'Restarting...'); - const pid = ns.exec(`${dest}${updateFile}`, args['device'], 1, '--skip-self', '--no-banner'); + const pid = ns.run(`${dest}${updateFile}`, 1, args['device'], '--skip-self', '--no-banner'); if(pid == 0) ns.tprint('Failed'); else ns.tprint('Complete'); return await slowPrint(ns, ''); @@ -175,3 +176,7 @@ export async function main(ns) { ns.tprint(''); } } + +export function autocomplete(data) { + return [...data.servers]; +}