mirror of
https://github.com/Mas0nShi/typoraCracker.git
synced 2023-07-10 13:41:20 +08:00
more details.
This commit is contained in:
@@ -11,7 +11,6 @@ import subprocess
|
||||
import json
|
||||
import os
|
||||
|
||||
|
||||
BASE_DIR = os.path.dirname(__file__)
|
||||
|
||||
|
||||
@@ -23,12 +22,12 @@ def get_version(to_path):
|
||||
|
||||
|
||||
def download_file(from_link, to_path):
|
||||
subprocess.check_call(["wget", from_link, "-O", to_path])
|
||||
subprocess.check_call(["wget", "-q", from_link, "-O", to_path])
|
||||
|
||||
|
||||
def extract_file(from_path, to_path):
|
||||
if from_path.endswith(".exe"):
|
||||
subprocess.check_call(["innoextract", from_path, "-d", to_path])
|
||||
subprocess.check_call(["innoextract", "-q", from_path, "-d", to_path])
|
||||
elif from_path.endswith(".tar.gz"):
|
||||
subprocess.check_call(["tar", "-zxvf", from_path, "-C", to_path])
|
||||
|
||||
@@ -48,7 +47,6 @@ def patch_file(_key, _iv, to_dir):
|
||||
|
||||
|
||||
def scheduler(func, basedir, link, root_path):
|
||||
|
||||
download_path = os.path.join(basedir, os.path.basename(link))
|
||||
log.info(f"downloading from {link}")
|
||||
download_file(link, download_path)
|
||||
|
||||
Reference in New Issue
Block a user