summary refs log tree commit diff stats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile53
1 files changed, 47 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index b27b392..bda68ca 100644
--- a/Makefile
+++ b/Makefile
@@ -6,20 +6,41 @@ GOFLAGS?=-tags netgo \
 				 -ldflags '-X github.com/getwtxt/getwtxt/svc.Vers=${VERSION} -extldflags "-static"'
 
 getwtxt: getwtxt.go go.mod go.sum
+	@echo
+	@echo Building getwtxt. This may take a minute or two.
 	go build $(GOFLAGS) \
 		-o $@
+	@echo
+	@echo ...Done!
 
-RM?=rm -f
-
+.PHONY: clean
 clean:
-	$(RM) getwtxt
+	@echo
+	@echo Cleaning build and module caches...
+	go clean -cache -modcache
+	@echo
+	@echo ...Done!
 
+.PHONY: update
 update:
+	@echo
+	@echo Updating from upstream repository...
+	@echo
 	git pull --rebase
 
+.PHONY: install
 install:
+	@echo
+	@echo Installing getwtxt...
+	@echo
+	@echo Creating user/group...
 	adduser -home $(BINDIR) --system --group getwtxt
+	@echo
+	@echo
+	@echo Creating directories...
 	mkdir -p $(BINDIR)/assets/tmpl $(BINDIR)/docs
+	@echo
+	@echo Copying files...
 	install -m755 getwtxt $(BINDIR)
 	install -m644 getwtxt.yml $(BINDIR)
 	install -m644 assets/style.css $(BINDIR)/assets
@@ -27,11 +48,31 @@ install:
 	install -m644 README.md $(BINDIR)/docs
 	install -m644 LICENSE $(BINDIR)/docs
 	install -m644 etc/getwtxt.service /etc/systemd/system
+	@echo
+	@echo
+	@echo Setting ownership...
 	chown -R getwtxt:getwtxt $(BINDIR)
+	@echo
+	@echo ...Done!
 
+.PHONY: uninstall
 uninstall:
-	systemctl stop getwtxt >/dev/null 2>&1
-	systemctl disable getwtxt >/dev/null 2>&1
+	@echo
+	@echo Uninstalling getwtxt...
+	@echo
+	@echo Stopping service if running...
+	@echo systemctl stop getwtxt
+	@systemctl stop getwtxt >/dev/null 2>&1 || true
+	@echo
+	@echo Disabling service autostart...
+	@echo systemctl disable getwtxt
+	@systemctl disable getwtxt >/dev/null 2>&1 || true
+	@echo
+	@echo Removing files
 	rm -rf $(BINDIR)
 	rm -f /etc/systemd/system/getwtxt.service
-	userdel getwtxt
+	@echo
+	@echo Removing user
+	- userdel getwtxt
+	@echo
+	@echo ...Done!
s='alt'>
71577c1f ^
81190251 ^

a2726b6a ^

71577c1f ^
3bb1f124 ^
7db1bcee ^
d56f6dc3 ^
5c65599e ^
81190251 ^
447d2358 ^
447d2358 ^

a2726b6a ^

447d2358 ^



a2726b6a ^

447d2358 ^



a2726b6a ^

447d2358 ^



a2726b6a ^

447d2358 ^
a2726b6a ^
49661625 ^
302d0dd5 ^
07cc19ce ^
447d2358 ^
3bb1f124 ^
88f423af ^
7db1bcee ^

00a475cf ^
8db2389d ^


7db1bcee ^
e571ccd8 ^
5c65599e ^
81190251 ^
3e3786eb ^
71577c1f ^

a2726b6a ^

447d2358 ^
a2726b6a ^
447d2358 ^
3bb1f124 ^
00a475cf ^
8db2389d ^


7db1bcee ^
e571ccd8 ^





a2726b6a ^

e571ccd8 ^
a2726b6a ^
a4cadf78 ^
302d0dd5 ^
07cc19ce ^
e571ccd8 ^





8db2389d ^


e571ccd8 ^

5c65599e ^
81190251 ^
447d2358 ^
447d2358 ^
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109