Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
ysawa0 committed May 13, 2024
1 parent bf6f664 commit 20d4e08
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions templates/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,26 @@ ifeq ($(shell uname),Darwin)

@echo "Setting up shellcheck (macOS)..."
brew install shellcheck
else ifeq ($(shell uname -s),Linux)
ifeq ($(shell uname -m),x86_64)
@echo "Setting up shfmt for amd64 (Linux)..."
wget -qO shfmt "https://github.com/mvdan/sh/releases/download/${SHFMT_VERSION}/shfmt_${SHFMT_VERSION}_linux_amd64"
else ifeq ($(shell uname -m),aarch64)
@echo "Setting up shfmt for arm64 (Linux)..."
wget -qO shfmt "https://github.com/mvdan/sh/releases/download/${SHFMT_VERSION}/shfmt_${SHFMT_VERSION}_linux_arm64"
else
@echo "Setting up shfmt (Linux)..."
wget -qO shfmt "https://github.com/mvdan/sh/releases/download/${SHFMT_VERSION}/shfmt_${SHFMT_VERSION}_$(shell uname -m)"
@echo "Unsupported architecture $(shell uname -m)! Update this Makefile!"
exit 1
endif
chmod +x shfmt
sudo mv shfmt /usr/local/bin/

sudo mv shfmt /usr/local/bin/shfmt
@echo "Setting up shellcheck (Linux)..."
sudo apt-get install shellcheck || sudo yum install shellcheck || sudo dnf install shellcheck
else
@echo "Unsupported operating system! Update this Makefile or use macOS/Linux."
exit 1
endif

.PHONY: reqtxt
reqtxt:
poetry export -f requirements.txt --output requirements.txt

0 comments on commit 20d4e08

Please sign in to comment.