Skip to content

Commit

Permalink
Removed blog section
Browse files Browse the repository at this point in the history
  • Loading branch information
fadado committed Nov 5, 2018
1 parent 93583c8 commit 5a5aa16
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 24 deletions.
35 changes: 18 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ ifndef version_test
$(error GNU Make version $(MAKE_VERSION); version >= 3.82 is needed)
endif

# Paranoia
ifeq (,$(filter install uninstall,$(MAKECMDGOALS)))
ifeq (0,$(shell id --user))
$(error Root only can make "(un)install" targets)
$(error Root only can make "(un)install" targets)
endif
SUDO :=
else
SUDO := sudo
ifneq (0,$(shell id --user))
$(error Only root can make "(un)install" targets)
endif
endif

########################################################################
Expand Down Expand Up @@ -86,9 +86,10 @@ SHELL := /bin/bash
# Warning: only `dnf`! Use this rule as template to your own script.
setup:
@rpm -q --quiet general-purpose-preprocessor || sudo dnf -y install general-purpose-preprocessor
@rpm -q --quiet jq || sudo dnf -y install jq
@test -e /usr/bin/jq || test -e /usr/local/bin/jq || sudo dnf -y install jq
@rpm -q --quiet pandoc || sudo dnf -y install pandoc
@test -d /usr/share/doc/PyYAML || sudo dnf -y install PyYAML
@rpm -q --quiet python2-pyyaml || sudo dnf -y install python2-pyyaml
@echo Done!

# Default target
all: check
Expand All @@ -106,19 +107,19 @@ clobber: clean

install:
[[ -e jqt.1.gz ]] || { cd docs && make ../jqt.1.gz; }
test -d $(bindir) || $(SUDO) mkdir --verbose --parents $(bindir)
test -d $(datadir)/$(PROJECT) || $(SUDO) mkdir --verbose --parents $(datadir)/$(PROJECT)
test -d $(mandir)/man1 || $(SUDO) mkdir --verbose --parents $(mandir)/man1
$(SUDO) install --verbose --compare --mode 555 bin/* $(bindir)
$(SUDO) install --verbose --compare --mode 644 share/* $(datadir)/$(PROJECT)
$(SUDO) install --verbose --compare --mode 644 jqt.1.gz $(mandir)/man1
$(SUDO) sed -i -e "s#DATADIR='.*'#DATADIR='$(datadir)'#" $(bindir)/jqt
test -d $(bindir) || mkdir --verbose --parents $(bindir)
test -d $(datadir)/$(PROJECT) || mkdir --verbose --parents $(datadir)/$(PROJECT)
test -d $(mandir)/man1 || mkdir --verbose --parents $(mandir)/man1
install --verbose --compare --mode 555 bin/* $(bindir)
install --verbose --compare --mode 644 share/* $(datadir)/$(PROJECT)
install --verbose --compare --mode 644 jqt.1.gz $(mandir)/man1
sed -i -e "s#DATADIR='.*'#DATADIR='$(datadir)'#" $(bindir)/jqt

uninstall:
$(SUDO) rm --verbose --force -- $(addprefix $(prefix)/,$(wildcard bin/*))
$(SUDO) rm --verbose --force -- $(mandir)/man1/jqt.1.gz
test -d $(datadir)/$(PROJECT) \
&& $(SUDO) rm --verbose --force --recursive $(datadir)/$(PROJECT) \
rm --verbose --force -- $(addprefix $(prefix)/,$(wildcard bin/*))
rm --verbose --force -- $(mandir)/man1/jqt.1.gz
test -d $(datadir)/$(PROJECT) \
&& rm --verbose --force --recursive $(datadir)/$(PROJECT) \
|| true

# Show targets
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ $ sudo dnf -y install make general-purpose-preprocessor jq pandoc PyYAML
```

To install _jqt_ simply run `make install` on the _jqt_ repository top
directory. If don’t like to install into the `/usr/local` system directory you
directory. If you don’t like to install into the `/usr/local` system directory you
can change the destination directory:

```zsh
Expand Down
2 changes: 1 addition & 1 deletion docs/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ menu:
- structure
- content
- data
- blog/index
# - blog/index

# Default values
defaults:
Expand Down
5 changes: 3 additions & 2 deletions docs/make.d/prelude.make
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ ifeq (,$(filter install uninstall,$(MAKECMDGOALS)))
ifeq (0,$(shell id --user))
$(error Root only can make "(un)install" targets)
endif
SUDO :=
else
SUDO := sudo
ifneq (0,$(shell id --user))
$(error Only root can make "(un)install" targets)
endif
endif

# Target 'clobber' must be alone
Expand Down
14 changes: 11 additions & 3 deletions docs/project.make
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
########################################################################
#
# Specific makefile for this web site
# Specific makefile for this web site.
# This should be the only file to edit by hand!
#
# Defined rules for:
# Variables imported:
# Content
# Metadata
# JQTFLAGS
#
# Define new rules for:
# $(ManPage)
# /tmp/help
# Defined targets:
#
# Add double-colon recipes for targets:
# all
# clean
# clobber
Expand All @@ -14,6 +21,7 @@
# Build pages options
########################################################################

# Append parameters to:
JQTFLAGS += -msnippets:$(Metadata)/snippets.json

# Pandoc options
Expand Down

0 comments on commit 5a5aa16

Please sign in to comment.