modified: .github/workflows/mikrotik_patch.yml

deleted:    gobash/Makefile
	deleted:    gobash/go.mod
	deleted:    gobash/main.go
This commit is contained in:
zyb 2024-06-30 18:48:58 +08:00
parent ab082c4d1c
commit 473cd3b596
4 changed files with 6 additions and 30 deletions

View File

@ -57,15 +57,13 @@ jobs:
- name: Create Squashfs for option and python3 - name: Create Squashfs for option and python3
if: steps.cache-squashfs.outputs.cache-hit != 'true' if: steps.cache-squashfs.outputs.cache-hit != 'true'
run: | run: |
cd gobash sudo wget -O bash -nv https://busybox.net/downloads/binaries/1.31.0-i686-uclibc/busybox_ASH
sudo make sudo wget -O busybox -nv https://busybox.net/downloads/binaries/1.31.0-i686-uclibc/busybox
sudo wget -O busybox -nv https://bin.ajam.dev/x86_64_Linux/busybox sudo chmod +x busybox
cd .. sudo chmod +x bash
sudo mkdir -p ./option-root/bin/ sudo mkdir -p ./option-root/bin/
sudo cp ./gobash/busybox ./option-root/bin/ sudo mv busybox ./option-root/bin/
sudo cp ./gobash/bash ./option-root/bin/ sudo mv bash ./option-root/bin/
sudo chmod +x ./option-root/bin/busybox
sudo chmod +x ./option-root/bin/bash
COMMANDS=$(./option-root/bin/busybox --list) COMMANDS=$(./option-root/bin/busybox --list)
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

View File

@ -1,2 +0,0 @@
all:
GOOS=linux GOARCH=amd64 go build -ldflags "-w -s -extldflags '-static'" -o bash

View File

@ -1,3 +0,0 @@
module bash
go 1.21.5

View File

@ -1,17 +0,0 @@
package main
import (
"log"
"os"
"os/exec"
)
func main() {
busybox := "busybox"
args := []string{"ash"}
cmd := exec.Command(busybox, args...)
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
if err := cmd.Run(); err != nil {
log.Fatalf("execv error: %v", err)
}
}