Update Makefile
This commit is contained in:
parent
60195aa043
commit
b379f3bc79
9
Makefile
9
Makefile
|
@ -1,7 +1,8 @@
|
|||
DESTDIR = /usr/local/bin
|
||||
SUDOERSDIR = /private/etc/sudoers.d
|
||||
INSTALL_PATH_CBATTERY = $(DESTDIR)/cbattery
|
||||
INSTALL_PATH_VISUDO = $(SUDOERSDIR)/cbattery
|
||||
PREFIX ?= /usr/local
|
||||
DESTDIR = $(PREFIX)/bin
|
||||
|
||||
all: install
|
||||
|
||||
|
@ -10,10 +11,10 @@ install: $(INSTALL_PATH_CBATTERY) $(INSTALL_PATH_VISUDO)
|
|||
$(INSTALL_PATH_VISUDO): .visudo
|
||||
@echo "Installing visudo file to $(SUDOERSDIR)"
|
||||
@if ! test -d "$(SUDOERSDIR)"; then \
|
||||
mkdir -p "$(SUDOERSDIR)"; \
|
||||
sudo mkdir -p "$(SUDOERSDIR)"; \
|
||||
fi
|
||||
@cp $< $(SUDOERSDIR)/cbattery
|
||||
@chmod 440 $(SUDOERSDIR)/cbattery
|
||||
@sudo cp $< $(SUDOERSDIR)/cbattery
|
||||
@sudo chmod 440 $(SUDOERSDIR)/cbattery
|
||||
|
||||
$(INSTALL_PATH_CBATTERY): cbattery
|
||||
@echo "Installing cbattery to $(DESTDIR)"
|
||||
|
|
Loading…
Reference in New Issue