Skip to content

Commit

Permalink
fix: build
Browse files Browse the repository at this point in the history
  • Loading branch information
lovegaoshi committed Nov 30, 2024
1 parent ecf645a commit e3ffa7c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions biliupinit.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
import tarfile
import glob
import os

import requests

if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser(description='ina music segment')
parser.add_argument(
'--system', type=str, default=r'x86_64-linux-musl\.tar\.xz',
'--system', type=str, default=r'x86_64-linux-musl.tar.xz',
)
args = parser.parse_args()
subprocess.call(
r'curl -s https://api.github.com/repositories/437055168/releases/latest \
| grep "browser_download_url.*"' + args.system + \
r'| cut -d : -f 2,3 | tr -d \" | wget -qi -', shell=True)

req = requests.get('https://api.github.com/repositories/437055168/releases/latest').json()
targeted_download = list(filter(lambda x: args.system in x['name'], req['assets']))[0]
subprocess.call(['wget', targeted_download['browser_download_url']])
biliup_tar_path = glob.glob('biliupR*')[0]
tarfile.open(biliup_tar_path).extractall()0
tarfile.open(biliup_tar_path).extractall()
os.remove(biliup_tar_path)
for file in glob.glob('biliupR*/*'):
os.rename(file, os.path.join('/bin', os.path.basename(file)))

0 comments on commit e3ffa7c

Please sign in to comment.