-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·31 lines (26 loc) · 1004 Bytes
/
Makefile
File metadata and controls
executable file
·31 lines (26 loc) · 1004 Bytes
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
PREFIX = $(HOME)/.local
INSTALL_BIN_DIR = $(DESTDIR)$(PREFIX)/bin
INSTALL_LIB_DIR = $(DESTDIR)$(PREFIX)/lib/ttytok
INSTALL_PT_DIR = $(DESTDIR)$(PREFIX)/lib/piratetok
INSTALL_SHARE_DIR = $(HOME)/.local/share/ttytok
SCRIPTS = ttytok.sh connector.sh discover.sh userselect.sh watchers.sh
.PHONY: install uninstall deps
deps:
@if command -v bpkg >/dev/null 2>&1; then \
bpkg install PirateTok/live-sh; \
else \
echo "fetching piratetok.sh from github..."; \
mkdir -p $(INSTALL_PT_DIR); \
curl -fsSL https://raw.githubusercontent.com/PirateTok/live-sh/main/lib/piratetok.sh \
-o $(INSTALL_PT_DIR)/piratetok.sh; \
fi
install: deps
mkdir -p $(INSTALL_BIN_DIR) $(INSTALL_LIB_DIR) $(INSTALL_SHARE_DIR)
install -Dm755 ttytok.sh $(INSTALL_BIN_DIR)/ttytok
for script in $(SCRIPTS); do \
install -Dm755 $$script $(INSTALL_LIB_DIR)/$$script; \
done
@test -f $(INSTALL_SHARE_DIR)/users || touch $(INSTALL_SHARE_DIR)/users
uninstall:
rm -f $(INSTALL_BIN_DIR)/ttytok
rm -rf $(INSTALL_LIB_DIR)