Skip to content

Commit 1a32ec8

Browse files
committed
Add doas support
1 parent 0e30e1d commit 1a32ec8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,14 @@ install-darwin: app-bundle
170170
install-unix: build
171171
@echo "Installing on $(shell uname)..."
172172
@echo "Installing binary to /usr/local/bin..."
173-
@sudo install -m 755 out/$(APP_NAME) /usr/local/bin/
173+
@if command -v sudo >/dev/null 2>&1; then \
174+
sudo install -m 755 out/$(APP_NAME) /usr/local/bin/; \
175+
elif command -v doas >/dev/null 2>&1; then \
176+
doas install -m 755 out/$(APP_NAME) /usr/local/bin/; \
177+
else \
178+
echo "Error: Neither sudo nor doas found. Please install the binary manually."; \
179+
exit 1; \
180+
fi
174181
@echo "Installation complete! $(APP_NAME) has been installed to /usr/local/bin"
175182

176183
# Install on Windows

0 commit comments

Comments
 (0)