Skip to content

Commit 032d69c

Browse files
committed
Changing the default install location for RISC-V machine
1 parent 3c015a4 commit 032d69c

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export VERSION=3.0.0-beta
22
export RELEASE_PATH="releases/aliyun-cli-${VERSION}"
3+
ARCH ?= $(shell uname -m)
34

45
all: build
56
publish: build build_mac build_linux build_windows build_linux_arm64 gen_version
@@ -14,7 +15,12 @@ build: deps
1415
go build -ldflags "-X 'github.com/aliyun/aliyun-cli/cli.Version=${VERSION}'" -o out/aliyun main/main.go
1516

1617
install: build
17-
cp out/aliyun /usr/local/bin
18+
@if [ "$(ARCH)" = "riscv64" ]; then \
19+
install -d "$(HOME)/.local/bin"; \
20+
install -m755 out/aliyun "$(HOME)/.local/bin/aliyun"; \
21+
else \
22+
install -Dm755 out/aliyun /usr/local/bin/aliyun; \
23+
fi
1824

1925
build_mac:
2026
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-X 'github.com/aliyun/aliyun-cli/cli.Version=${VERSION}'" -o out/aliyun main/main.go

0 commit comments

Comments
 (0)