mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2025-05-05 03:18:44 +00:00
Add install target for make
- Update default config path accordingly - Mention use of config file in README
This commit is contained in:
parent
a981085260
commit
cd9306294d
4 changed files with 29 additions and 9 deletions
27
Makefile
27
Makefile
|
@ -1,11 +1,32 @@
|
|||
GO=go
|
||||
BINPATH=/usr/local/bin
|
||||
DATAPATH=/var/bloat
|
||||
ETCPATH=/etc
|
||||
|
||||
all: bloat
|
||||
|
||||
PHONY:
|
||||
|
||||
bloat: main.go PHONY
|
||||
bloat: main.go
|
||||
$(GO) build $(GOFLAGS) -o bloat main.go
|
||||
|
||||
install: bloat
|
||||
cp bloat $(BINPATH)/bloat
|
||||
chmod 0755 $(BINPATH)/bloat
|
||||
mkdir -p $(DATAPATH)/database
|
||||
cp -r templates $(DATAPATH)/
|
||||
cp -r static $(DATAPATH)/
|
||||
sed -e "s%=database%=$(DATAPATH)/database%g" \
|
||||
-e "s%=templates%=$(DATAPATH)/templates%g" \
|
||||
-e "s%=static%=$(DATAPATH)/static%g" \
|
||||
< bloat.conf > $(ETCPATH)/bloat.conf
|
||||
|
||||
uninstall:
|
||||
rm -f $(BINPATH)/bloat
|
||||
rm -fr $(DATAPATH)/templates
|
||||
rm -fr $(DATAPATH)/static
|
||||
rm -f $(ETCPATH)/bloat.conf
|
||||
|
||||
clean:
|
||||
rm -f bloat
|
||||
|
||||
run: bloat
|
||||
./bloat
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue