From 2b5866a5559478d65fa520fdf04ece5e9b6d2b83 Mon Sep 17 00:00:00 2001 From: shaoying Date: Thu, 26 Nov 2020 21:50:22 +0800 Subject: [PATCH] opt some --- Makefile | 3 +++ src/main.shy | 3 +++ src/relay.go | 5 +++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4b9b6cbe..3ffdd921 100644 --- a/Makefile +++ b/Makefile @@ -5,3 +5,6 @@ export CGO_ENABLED=0 all: @echo && date 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/$@ diff --git a/src/main.shy b/src/main.shy index 6b79bb23..fdceddba 100644 --- a/src/main.shy +++ b/src/main.shy @@ -1,3 +1,6 @@ +field web.code.compile +field web.code.publish + title "contexts" chapter "实践" diff --git a/src/relay.go b/src/relay.go index 6dd60104..2a79449c 100644 --- a/src/relay.go +++ b/src/relay.go @@ -3,14 +3,15 @@ package main import ( ice "github.com/shylinux/icebergs" _ "github.com/shylinux/icebergs/base/ssh" + log "github.com/shylinux/toolkits/logs" "os" "path" ) 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:]...) print(ice.Run(args...)) } -