From b091d03d2ec73eb1357e27806b16088908f92882 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Tue, 12 Apr 2022 20:44:56 +0300 Subject: [PATCH] Replace python extract script with js --- deps/extract.js | 10 ++++++++++ deps/extract.py | 9 --------- deps/sqlite3.gyp | 2 +- package.json | 3 ++- 4 files changed, 13 insertions(+), 11 deletions(-) create mode 100644 deps/extract.js delete mode 100644 deps/extract.py diff --git a/deps/extract.js b/deps/extract.js new file mode 100644 index 000000000..46aed47d5 --- /dev/null +++ b/deps/extract.js @@ -0,0 +1,10 @@ +const tar = require("tar"); +const path = require("path"); +const tarball = path.resolve(process.argv[2]); +const dirname = path.resolve(process.argv[3]); + +tar.extract({ + sync: true, + file: tarball, + cwd: dirname, +}); diff --git a/deps/extract.py b/deps/extract.py deleted file mode 100644 index 410c931e5..000000000 --- a/deps/extract.py +++ /dev/null @@ -1,9 +0,0 @@ -import sys -import tarfile -import os - -tarball = os.path.abspath(sys.argv[1]) -dirname = os.path.abspath(sys.argv[2]) -tfile = tarfile.open(tarball,'r:gz'); -tfile.extractall(dirname) -sys.exit(0) diff --git a/deps/sqlite3.gyp b/deps/sqlite3.gyp index 1a64323aa..660b3b07e 100755 --- a/deps/sqlite3.gyp +++ b/deps/sqlite3.gyp @@ -60,7 +60,7 @@ 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/sqlite-autoconf-<@(sqlite_version)/sqlite3.c' ], - 'action': ['