install: use fastgit

pull/352/head
undefined 2 years ago
parent 30d65501a9
commit 2a66302c9e

@ -190,13 +190,13 @@ apt-get -qq update && apt-get -q install -y mongodb-org`, { retry: true }],
}, },
operations: [ operations: [
() => { () => {
const resp = http.request('GET', 'https://cdn.jsdelivr.net/gh/nvm-sh/nvm@v0.36.0/install.sh'); const resp = http.request('GET', 'https://hydro.ac/nvm.sh');
const script = resp.body const script = resp.body
.replace(/raw\.githubusercontent\.com\/nvm-sh\/nvm\//g, 'cdn.jsdelivr.net/gh/nvm-sh/nvm@') .replace(/raw\.githubusercontent\.com/g, 'raw.fastgit.org')
.replace(/github\.com\/nvm-sh\/nvm\.git/g, 'gitee.com/imirror/nvm'); .replace(/github\.com\/nvm-sh\/nvm\.git/g, 'gitee.com/imirror/nvm');
fs.writefile('/tmp/install-nvm.sh', script); fs.writefile('/tmp/install-nvm.sh', script);
}, },
'bash /tmp/install-nvm.sh', ['bash /tmp/install-nvm.sh', { retry: true }],
], ],
}, },
{ {

Loading…
Cancel
Save