1
0
mirror of https://shylinux.com/x/ContextOS synced 2025-04-25 16:58:06 +08:00
This commit is contained in:
shaoying 2020-11-26 21:50:22 +08:00
parent f9eb42741e
commit 2b5866a555
3 changed files with 9 additions and 2 deletions

View File

@ -5,3 +5,6 @@ export CGO_ENABLED=0
all: all:
@echo && date @echo && date
go build -v -o bin/ice.bin src/main.go && chmod u+x bin/ice.bin && ./bin/ice.sh restart go build -v -o bin/ice.bin src/main.go && chmod u+x bin/ice.bin && ./bin/ice.sh restart
relay: src/relay.go
@echo && date
go build -v -o usr/publish/$@ src/$@.go && chmod u+x usr/publish/$@

View File

@ -1,3 +1,6 @@
field web.code.compile
field web.code.publish
title "contexts" title "contexts"
chapter "实践" chapter "实践"

View File

@ -3,14 +3,15 @@ package main
import ( import (
ice "github.com/shylinux/icebergs" ice "github.com/shylinux/icebergs"
_ "github.com/shylinux/icebergs/base/ssh" _ "github.com/shylinux/icebergs/base/ssh"
log "github.com/shylinux/toolkits/logs"
"os" "os"
"path" "path"
) )
func main() { func main() {
args := []string{"ssh.connect", "open", "authfile", path.Join(os.Getenv("HOME"), ".ssh/" path.Base(os.Args[0])".json")} log.LogDisable = true
args := []string{"ssh.connect", "open", "authfile", path.Join(os.Getenv("HOME"), ".ssh/", path.Base(os.Args[0])+".json")}
args = append(args, os.Args[1:]...) args = append(args, os.Args[1:]...)
print(ice.Run(args...)) print(ice.Run(args...))
} }