5 Star 23 Fork 6

biulai/gossh

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.sh 798 Bytes
一键复制 编辑 原始数据 按行查看 历史
andes 提交于 2019-04-24 00:19 +08:00 . [bug] 修复ip文件不支持域名的问题
# build gossh and passtool
# support architecture: amd64 386
# suporrt os: linux and windows
# authur: andes
# email: email.tata@qq.com
#!/bin/bash
workhome=$(cd $(dirname $0) && pwd)
binpath=${workhome}/bin
oss=(linux windows)
arches=(amd64 386 arm64)
target=(gossh passtool)
for arch in ${arches[@]};do
for os in ${oss[@]};do
for t in ${target[@]};do
if [[ ${arch} == "arm64" && ${os} == "windows" ]];then
continue
fi
cmd="CGO_ENABLED=0 GOOS=${os} GOARCH=${arch} go build"
echo "${cmd} ${t}.go"
eval ${cmd} ${t}.go
if [[ ! -d ${binpath}/${arch}/${os} ]];then
mkdir -p ${binpath}/${arch}/${os}
fi
if [[ "${os}" == "windows" ]];then
mv ${t}.exe ${binpath}/${arch}/${os}
else
mv ${t} ${binpath}/${arch}/${os}
fi
done
done
done
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/saxss/gossh.git
git@gitee.com:saxss/gossh.git
saxss
gossh
gossh
master

搜索帮助