about summary refs log tree commit diff stats
path: root/html/127next-word.subx.html
Commit message (Expand)AuthorAgeFilesLines
* .Kartik K. Agaram2021-07-161-10/+10
* .Kartik Agaram2021-06-261-5/+5
* .Kartik Agaram2021-06-241-4/+4
* .Kartik Agaram2021-04-211-4/+4
* .Kartik Agaram2021-03-231-34/+34
* 7476Kartik Agaram2020-12-301-1/+1
* 7335Kartik Agaram2020-12-041-293/+355
* 7162Kartik Agaram2020-11-021-15/+15
* 6958Kartik Agaram2020-10-051-231/+279
* 6631Kartik Agaram2020-07-101-0/+315
69217dd27196dd59c96bc405afe4bfd83ad17c00'>69217dd ^
96fbc6e ^
be76daa ^
69217dd ^
96fbc6e ^
69217dd ^
96fbc6e ^



be76daa ^
69217dd ^
96fbc6e ^
69217dd ^
96fbc6e ^


69217dd ^
be76daa ^

69217dd ^
96fbc6e ^
69217dd ^
96fbc6e ^



69217dd ^
96fbc6e ^


ee0d421 ^
96fbc6e ^

69217dd ^






96fbc6e ^


69217dd ^
96fbc6e ^
be76daa ^

69217dd ^
96fbc6e ^
69217dd ^
96fbc6e ^











69217dd ^

96fbc6e ^



be76daa ^
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


                           
                                                         
                      
                                                                                                                   
 
                                 

                                                              
                      

                             
             
                       
 
             
      



                                                 
                       
 
              
       


                                                  
                         

                       
 
               
        



                                    
                                                        


                                     
                                                                    

                              






                                                                  


                                  
                                          
             

                                                    
 
                 
          











                                                          

                                                 



                           
                       
PREFIX?=/usr/local
_INSTDIR=$(PREFIX)
BINDIR?=$(_INSTDIR)/getwtxt
VERSION?=$(shell git tag | grep ^v | sort -V | tail -n 1)
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.
	@mkdir -p logs
	go build $(GOFLAGS) \
		-o $@
	@echo
	@echo ...Done\!

.PHONY: clean
clean:
	@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
	@echo
	@echo ...Done\!

.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 $(BINDIR)/logs
	@echo
	@echo Copying files...
	install -m755 getwtxt $(BINDIR)
	install -m644 getwtxt.yml $(BINDIR)
	install -m644 assets/style.css $(BINDIR)/assets
	install -m644 assets/tmpl/index.html $(BINDIR)/assets/tmpl
	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\! Don\'t forget to run
	@echo '         $$ systemctl enable getwtxt'

.PHONY: uninstall
uninstall:
	@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
	@echo
	@echo Removing user
	- userdel getwtxt
	@echo
	@echo ...Done\!