better-sqlite3/deps/extract.js
2025-02-13 14:37:15 -08:00

17 lines
424 B
JavaScript

'use strict';
const path = require('path');
const tar = require('tar');
const source = process.argv[2];
const dest = process.argv[3];
process.on('unhandledRejection', (err) => { throw err; });
/*
This extracts the bundled sqlcipher.tar.gz file and places the resulting files
into the directory specified by <$2>.
*/
tar.extract({ file: source, cwd: dest, onwarn: process.emitWarning })
.then(() => process.exit(0));