提交 e26ce572 作者: Jakub Sztandera

bin: dist_get script: prevents get_go_vars() returns same values twice

License: MIT
Signed-off-by: 's avatarAriel Machado <sparciie@yahoo.com>
上级 685cd28d
...@@ -75,9 +75,7 @@ unarchive() { ...@@ -75,9 +75,7 @@ unarchive() {
get_go_vars() { get_go_vars() {
if [ ! -z "$GOOS" ] && [ ! -z "$GOARCH" ]; then if [ ! -z "$GOOS" ] && [ ! -z "$GOARCH" ]; then
printf "%s-%s" "$GOOS" "$GOARCH" printf "%s-%s" "$GOOS" "$GOARCH"
fi elif have_binary go; then
if have_binary go; then
printf "%s-%s" "$(go env GOOS)" "$(go env GOARCH)" printf "%s-%s" "$(go env GOOS)" "$(go env GOARCH)"
else else
die "no way of determining system GOOS and GOARCH\nPlease manually set GOOS and GOARCH then retry." die "no way of determining system GOOS and GOARCH\nPlease manually set GOOS and GOARCH then retry."
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论