Skip to content

Commit

Permalink
fix: aarch build
Browse files Browse the repository at this point in the history
  • Loading branch information
lovegaoshi committed Nov 30, 2024
1 parent 7819f8b commit ecf645a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Dockerfile-aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ COPY ./requirements.txt /inaseg/requirements.txt
RUN pip3 install -r /inaseg/requirements.txt
RUN pip3 install --force-reinstall git+https://github.com/grqz/yt-dlp.git@ie/bilibili/pi_fallbk
COPY . /inaseg
RUN python /inaseg/initialize.py
RUN python3 /inaseg/biliupinit.py --system aarch64-linux.tar.xz
26 changes: 17 additions & 9 deletions biliupinit.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,20 @@
import glob
import os

subprocess.call(
r'curl -s https://api.github.com/repositories/437055168/releases/latest \
| grep "browser_download_url.*x86_64-linux-musl\.tar\.xz" \
| cut -d : -f 2,3 | tr -d \" | wget -qi -', shell=True)
biliup_tar_path = glob.glob('biliupR*')[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)))

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',
)
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)
biliup_tar_path = glob.glob('biliupR*')[0]
tarfile.open(biliup_tar_path).extractall()0
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 ecf645a

Please sign in to comment.