chromium: triage mksnapshot

This commit is contained in:
2024-09-01 15:25:20 +08:00
parent d179bb2be7
commit fe0e3ea2d9
4 changed files with 254 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
/**
* Decompress the tarball for mksnapshot.
*/
import { spawn } from 'child_process';
import path from 'path';
import { dir } from '../mksnapshot.js';
import { promisifySpawn } from '../../cli.js';
import { mkdir } from 'fs/promises';
const { HOME } = process.env;
await mkdir(dir, { recursive: true });
await promisifySpawn(spawn('tar', [
'-xvzf',
path.resolve(HOME!, 'resources', 'mksnapshot_schedule.tar.gz'),
'-C',
dir
]));