-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGNUmakefile
35 lines (30 loc) · 877 Bytes
/
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
PREFIX = $(HOME)/.local
BIN = /usr/bin
MAN_DIR = /usr/share/man/man1
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 macOS X
ifeq ($(OS),Darwin)
BIN = /usr/local/bin
MAN_DIR = /usr/local/share/man/man1
endif
all:
@echo Run \'make install\' to install BashPass.
@echo Run \'make uninstall\' to uninstall BashPass.
install:
@echo Installing BashPass...
install -v -m755 bashpass $(BIN)
install -v -m644 docs/man/bashpass.1.gz $(MAN_DIR)
install -v -m644 docs/man/bashpass.conf.1.gz $(MAN_DIR)
@echo BashPass installed successfully!
uninstall:
@echo Uninstalling BashPass...
rm -vf $(BIN)/bashpass
rm -vf $(MAN_DIR)/bashpass.1.gz
rm -vf $(MAN_DIR)/bashpass.conf.1.gz
@echo BashPass uninstalled successfully!
@echo Bye, have a nice day!