mirror of
https://huihui.cat/mirrors/MikroTikPatch.git
synced 2025-12-10 03:24:37 +01:00
modified: patch.py
This commit is contained in:
parent
b7e1152036
commit
c154b2a036
1 changed files with 3 additions and 1 deletions
4
patch.py
4
patch.py
|
|
@ -294,7 +294,9 @@ def patch_npk_package(package,key_dict):
|
||||||
elif 'ARCH' in os.environ and os.environ['ARCH'] == '-arm64':
|
elif 'ARCH' in os.environ and os.environ['ARCH'] == '-arm64':
|
||||||
run_shell_command(f"sudo cp keygen/keygen_aarch64 {keygen}")
|
run_shell_command(f"sudo cp keygen/keygen_aarch64 {keygen}")
|
||||||
run_shell_command(f"sudo chmod a+x {keygen}")
|
run_shell_command(f"sudo chmod a+x {keygen}")
|
||||||
run_shell_command(f'echo " https://github.com/elseif/MikroTikPatch" | sudo tee -a {os.path.join(extract_dir,"nova/lib/console/logo.txt")}')
|
logo = os.path.join(extract_dir,"nova/lib/console/logo.txt")
|
||||||
|
run_shell_command(f'sudo sed -i "1d" {logo}')
|
||||||
|
run_shell_command(f'echo " https://github.com/elseif/MikroTikPatch" | sudo tee -a {logo}')
|
||||||
print(f"pack {extract_dir} ...")
|
print(f"pack {extract_dir} ...")
|
||||||
run_shell_command(f"rm -f {squashfs_file}")
|
run_shell_command(f"rm -f {squashfs_file}")
|
||||||
_, stderr = run_shell_command(f"mksquashfs {extract_dir} {squashfs_file} -quiet -comp xz -no-xattrs -b 256k")
|
_, stderr = run_shell_command(f"mksquashfs {extract_dir} {squashfs_file} -quiet -comp xz -no-xattrs -b 256k")
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue