Updated update script
This commit is contained in:
parent
d72cd78bcf
commit
8f85795c51
@ -1,18 +1,23 @@
|
|||||||
|
/**
|
||||||
|
* Automatically download all the scripts in the repository.
|
||||||
|
*/
|
||||||
export async function main(ns) {
|
export async function main(ns) {
|
||||||
|
const SRC = 'https://gitlab.zakscode.com/ztimson/BitBurner/-/raw/develop/scripts/';
|
||||||
|
const DIST = '/scripts/';
|
||||||
const FILE_LIST = [
|
const FILE_LIST = [
|
||||||
'scripts/auto-pwn.js',
|
'auto-pwn.js',
|
||||||
'scripts/bruteforce.js',
|
'bruteforce.js',
|
||||||
'scripts/crawler.js',
|
'crawler.js',
|
||||||
'scripts/miner.js',
|
'miner.js',
|
||||||
'scripts/node-manager.js',
|
'node-manager.js',
|
||||||
'scripts/update.js'
|
'update.js'
|
||||||
];
|
];
|
||||||
|
|
||||||
function getUrl(file) {
|
// Download each file
|
||||||
return `https://gitlab.zakscode.com/ztimson/BitBurner/-/raw/develop/${file}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
for(const FILE of FILE_LIST) {
|
for(const FILE of FILE_LIST) {
|
||||||
await ns.wget(getUrl(FILE), FILE);
|
ns.tprint(`Downloading: ${FILE}...`);
|
||||||
|
await ns.wget(`${SRC}${FILE}`, `${DIST}${FILE}`);
|
||||||
|
ns.tprint('Complete!');
|
||||||
}
|
}
|
||||||
|
ns.tprint('Done!');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user