mirror of
https://github.com/elseif/MikroTikPatch.git
synced 2026-09-07 10:34:36 +00:00
Compare commits
7 Commits
7.23
...
7.23.1-arm
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bbf8ed23e3 | ||
|
|
7039d76825 | ||
|
|
5e9340c741 | ||
|
|
ac2cfdeafd | ||
|
|
e728aec84c | ||
|
|
1d9971b387 | ||
|
|
1cfb6dba3d |
61
.github/workflows/mikrotik_patch_7.yml
vendored
61
.github/workflows/mikrotik_patch_7.yml
vendored
@@ -188,7 +188,64 @@ jobs:
|
|||||||
for cmd in $COMMANDS; do
|
for cmd in $COMMANDS; do
|
||||||
sudo ln -sf /pckg/option/bin/busybox ./option-root/bin/$cmd
|
sudo ln -sf /pckg/option/bin/busybox ./option-root/bin/$cmd
|
||||||
done
|
done
|
||||||
sudo mksquashfs option-root option.sfs -quiet -comp xz -no-xattrs -b 256k
|
sudo mkdir -p option-root/home/web/webfig/
|
||||||
|
BUSYBOX=$(./busybox/busybox_x86 | head -1 | cut -d' ' -f2)
|
||||||
|
sudo tee option.jg > /dev/null << EOF
|
||||||
|
[
|
||||||
|
{
|
||||||
|
name:'Patch About',
|
||||||
|
title:'Patch About',
|
||||||
|
icon: 30,
|
||||||
|
prio: 2000,
|
||||||
|
c:[
|
||||||
|
{
|
||||||
|
title:'Patch About',
|
||||||
|
type:'item',
|
||||||
|
path:[24, 2],
|
||||||
|
autorefresh: 1000,
|
||||||
|
ro: 1,
|
||||||
|
c: [
|
||||||
|
{name:'Author',type:'string',def:'elseif@live.cn'},
|
||||||
|
{name:'GitHub',type:'string',def:'https://github.com/elseif/MikroTikPatch', url:1},
|
||||||
|
{name:'Telegram',type:'string',def:'https://t.me/mikrotikpatch', url:1},
|
||||||
|
{name:'Homepage',type:'string',def:'https://mikrotik.ltd', url:1},
|
||||||
|
{type:'separator'},
|
||||||
|
{name:'Busybox',type:'string',def:'$BUSYBOX'},
|
||||||
|
{name:'Uptime',type:'interval',id:'u1'},
|
||||||
|
{name:'Architecture Name',type:'string',id:'s1a'},
|
||||||
|
{name:'Board Name',type:'string',id:'s2c'},
|
||||||
|
{name:'Version',type:'version',id:'s16'},
|
||||||
|
{name:'Build Time',type:'string',id:'s27'}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
EOF
|
||||||
|
sudo apt-get install python3-crcmod > /dev/null
|
||||||
|
HASH=$(sudo python3 -E <<EOF
|
||||||
|
import hashlib, crcmod, sys
|
||||||
|
with open('option.jg','rb') as f:
|
||||||
|
data = f.read()
|
||||||
|
sha1 = hashlib.sha1(data).hexdigest()[:12]
|
||||||
|
crc = crcmod.mkCrcFun(0x104C11DB7, initCrc=0xFFFFFFFF, rev=False, xorOut=0xFFFFFFFF)(data)
|
||||||
|
print(f"{sha1} {crc}")
|
||||||
|
EOF
|
||||||
|
)
|
||||||
|
SHA1_PREFIX=$(echo "$HASH" | awk '{print $1}')
|
||||||
|
CRC=$(echo "$HASH" | awk '{print $2}')
|
||||||
|
sudo mv option.jg option-$SHA1_PREFIX.jg
|
||||||
|
sudo python3 -E << EOF
|
||||||
|
import gzip
|
||||||
|
gzip.open('option-$SHA1_PREFIX.jg.gz', 'wb', compresslevel=0).write(open('option-$SHA1_PREFIX.jg', 'rb').read())
|
||||||
|
EOF
|
||||||
|
SIZE=$(stat -c %s option-$SHA1_PREFIX.jg.gz)
|
||||||
|
sudo mv option-$SHA1_PREFIX.jg.gz option-root/home/web/webfig/
|
||||||
|
sudo tee option-root/home/web/webfig/option.info > /dev/null << EOF
|
||||||
|
{ crc: $CRC, size: $SIZE, name: "option.jg", unique: "option-$SHA1_PREFIX.jg",version: "$LATEST_VERSION" },
|
||||||
|
EOF
|
||||||
|
sudo ln -sf option-$SHA1_PREFIX.jg.gz option-root/home/web/webfig/option.jg.gz
|
||||||
|
sudo mksquashfs option-root option.sfs -no-recovery -noappend -exit-on-error -quiet -comp xz -no-xattrs -b 256k -all-root
|
||||||
sudo rm -rf option-root
|
sudo rm -rf option-root
|
||||||
if [ "${{ matrix.arch }}" == "x86" ]; then
|
if [ "${{ matrix.arch }}" == "x86" ]; then
|
||||||
sudo wget -O cpython.tar.gz -nv https://github.com/astral-sh/python-build-standalone/releases/download/20241206/cpython-3.11.11+20241206-x86_64-unknown-linux-musl-install_only_stripped.tar.gz
|
sudo wget -O cpython.tar.gz -nv https://github.com/astral-sh/python-build-standalone/releases/download/20241206/cpython-3.11.11+20241206-x86_64-unknown-linux-musl-install_only_stripped.tar.gz
|
||||||
@@ -201,7 +258,7 @@ jobs:
|
|||||||
sudo rm cpython.tar.gz
|
sudo rm cpython.tar.gz
|
||||||
sudo rm -rf ./python/include
|
sudo rm -rf ./python/include
|
||||||
sudo rm -rf ./python/share
|
sudo rm -rf ./python/share
|
||||||
sudo mksquashfs python python3.sfs -quiet -comp xz -no-xattrs -b 256k
|
sudo mksquashfs python python3.sfs -no-recovery -noappend -exit-on-error -quiet -comp xz -no-xattrs -b 256k -all-root
|
||||||
sudo rm -rf ./python
|
sudo rm -rf ./python
|
||||||
|
|
||||||
- name: Cache mikrotik-${{ env.LATEST_VERSION }}${{ env.ARCH }}.iso
|
- name: Cache mikrotik-${{ env.LATEST_VERSION }}${{ env.ARCH }}.iso
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user