-
Notifications
You must be signed in to change notification settings - Fork 0
/
GNUmakefile
40 lines (34 loc) · 1.1 KB
/
GNUmakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
BIN = /usr/bin
MAN_DIR = /usr/share/man/man1
SUDO := sudo
OS := $(shell uname -s)
# Check if the operating system is Linux
ifeq ($(OS),Linux)
BIN = /usr/bin
MAN_DIR = /usr/share/man/man1
endif
# Check if the operating system is Mac OS X
ifeq ($(OS),Darwin)
BIN = /usr/local/bin
MAN_DIR = /usr/local/share/man/man1
endif
all:
@echo Run \'make install\' to install BashPass-Remote.
@echo Run \'make update\' to update BashPass-Remote.
@echo Run \'make uninstall\' to uninstall BashPass-Remote.
install:
@echo Installing BashPass-Remote...
@$(SUDO) install -v -m755 bashpass-remote $(BIN)
@$(SUDO) install -v -m644 docs/bashpass-remote.1.gz $(MAN_DIR)
@echo BashPass-Remote installed successfully!
update:
@echo Updating BashPass-Remote...
@$(SUDO) install -v -m755 bashpass-remote $(BIN)
@$(SUDO) install -v -m644 docs/bashpass-remote.1.gz $(MAN_DIR)
@echo BashPass-Remote updated successfully!
uninstall:
@echo Uninstalling BashPass-Remote...
@$(SUDO) rm -vf $(BIN)/bashpass-remote
@$(SUDO) rm -vf $(MAN_DIR)/bashpass-remote.1.gz
@echo BashPass-Remote uninstalled successfully!
@echo Bye, have a nice day!