mirror of
https://git.phreedom.club/localhost_frssoft/bloat.git
synced 2024-11-22 03:51:28 +00:00
Don't overwrite global config file on make install
This commit is contained in:
parent
4ef5e0daf2
commit
c2f237e901
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
||||||
bloat
|
bloat
|
||||||
database
|
database
|
||||||
|
bloat.gen.conf
|
||||||
|
|
1
INSTALL
1
INSTALL
|
@ -20,6 +20,7 @@ bloat looks for a file named bloat.conf in the working directory and
|
||||||
/etc/bloat in that order. You can also specify another file by using the -f
|
/etc/bloat in that order. You can also specify another file by using the -f
|
||||||
flag. Comments in the config file describe what each config value does. For
|
flag. Comments in the config file describe what each config value does. For
|
||||||
most cases, you only need to change the value of "client_website".
|
most cases, you only need to change the value of "client_website".
|
||||||
|
# cp bloat.gen.conf /etc/bloat.conf
|
||||||
# $EDITOR /etc/bloat.conf
|
# $EDITOR /etc/bloat.conf
|
||||||
|
|
||||||
4. Create database directory
|
4. Create database directory
|
||||||
|
|
9
Makefile
9
Makefile
|
@ -18,6 +18,10 @@ all: bloat
|
||||||
|
|
||||||
bloat: $(SRC) $(TMPL)
|
bloat: $(SRC) $(TMPL)
|
||||||
$(GO) build $(GOFLAGS) -o bloat main.go
|
$(GO) build $(GOFLAGS) -o bloat main.go
|
||||||
|
sed -e "s%=database%=/var/bloat%g" \
|
||||||
|
-e "s%=templates%=$(SHAREPATH)/templates%g" \
|
||||||
|
-e "s%=static%=$(SHAREPATH)/static%g" \
|
||||||
|
< bloat.conf > bloat.gen.conf
|
||||||
|
|
||||||
install: bloat
|
install: bloat
|
||||||
mkdir -p $(DESTDIR)$(BINPATH) \
|
mkdir -p $(DESTDIR)$(BINPATH) \
|
||||||
|
@ -29,10 +33,6 @@ install: bloat
|
||||||
chmod 0644 $(DESTDIR)$(SHAREPATH)/templates/*
|
chmod 0644 $(DESTDIR)$(SHAREPATH)/templates/*
|
||||||
cp -r static/* $(DESTDIR)$(SHAREPATH)/static
|
cp -r static/* $(DESTDIR)$(SHAREPATH)/static
|
||||||
chmod 0644 $(DESTDIR)$(SHAREPATH)/static/*
|
chmod 0644 $(DESTDIR)$(SHAREPATH)/static/*
|
||||||
sed -e "s%=database%=/var/bloat%g" \
|
|
||||||
-e "s%=templates%=$(SHAREPATH)/templates%g" \
|
|
||||||
-e "s%=static%=$(SHAREPATH)/static%g" \
|
|
||||||
< bloat.conf > /etc/bloat.conf
|
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -f $(DESTDIR)$(BINPATH)/bloat
|
rm -f $(DESTDIR)$(BINPATH)/bloat
|
||||||
|
@ -40,3 +40,4 @@ uninstall:
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f bloat
|
rm -f bloat
|
||||||
|
rm -f bloat.gen.conf
|
||||||
|
|
Loading…
Reference in a new issue