Skip to content

Commit 20d4e08

Browse files
committed
clean
1 parent bf6f664 commit 20d4e08

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

templates/Makefile

+14-5
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,26 @@ ifeq ($(shell uname),Darwin)
1212

1313
@echo "Setting up shellcheck (macOS)..."
1414
brew install shellcheck
15+
else ifeq ($(shell uname -s),Linux)
16+
ifeq ($(shell uname -m),x86_64)
17+
@echo "Setting up shfmt for amd64 (Linux)..."
18+
wget -qO shfmt "https://github.com/mvdan/sh/releases/download/${SHFMT_VERSION}/shfmt_${SHFMT_VERSION}_linux_amd64"
19+
else ifeq ($(shell uname -m),aarch64)
20+
@echo "Setting up shfmt for arm64 (Linux)..."
21+
wget -qO shfmt "https://github.com/mvdan/sh/releases/download/${SHFMT_VERSION}/shfmt_${SHFMT_VERSION}_linux_arm64"
1522
else
16-
@echo "Setting up shfmt (Linux)..."
17-
wget -qO shfmt "https://github.com/mvdan/sh/releases/download/${SHFMT_VERSION}/shfmt_${SHFMT_VERSION}_$(shell uname -m)"
23+
@echo "Unsupported architecture $(shell uname -m)! Update this Makefile!"
24+
exit 1
25+
endif
1826
chmod +x shfmt
19-
sudo mv shfmt /usr/local/bin/
20-
27+
sudo mv shfmt /usr/local/bin/shfmt
2128
@echo "Setting up shellcheck (Linux)..."
2229
sudo apt-get install shellcheck || sudo yum install shellcheck || sudo dnf install shellcheck
30+
else
31+
@echo "Unsupported operating system! Update this Makefile or use macOS/Linux."
32+
exit 1
2333
endif
2434

2535
.PHONY: reqtxt
2636
reqtxt:
2737
poetry export -f requirements.txt --output requirements.txt
28-

0 commit comments

Comments
 (0)