commit 3f9e94ec043a3342ce1320d0bd8e474e74bad927
parent c76ca0771ad6b57bc082cde7b0cd41e0749fa52d
Author: Christos Margiolis <christos@margiolis.net>
Date: Sun, 20 Sep 2020 21:47:58 +0300
standardized Makefile
Diffstat:
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/Makefile b/Makefile
@@ -1,16 +1,19 @@
-BIN = autoblog
-MAN1 = autoblog.1
+BIN = autoblog
+MAN1 = ${BIN}.1
PREFIX = /usr/local
MAN_DIR = ${PREFIX}/man/man1
BIN_DIR = ${PREFIX}/bin
+CP=cp -f
+MKDIR = mkdir -p
+
.PHONY: install
all: ${BIN}
install: all
- mkdir -p ${DESTDIR}${BIN_DIR}
- cp -f ${BIN} ${DESTDIR}${BIN_DIR}
- mkdir -p ${DESTDIR}${MAN_DIR}
- cp -f ${MAN1} ${DESTDIR}${MAN_DIR}
+ ${MKDIR} ${DESTDIR}${BIN_DIR}
+ ${CP} ${BIN} ${DESTDIR}${BIN_DIR}
+ ${MKDIR} ${DESTDIR}${MAN_DIR}
+ ${CP} ${MAN1} ${DESTDIR}${MAN_DIR}
chmod 644 ${DESTDIR}${MAN_DIR}/${MAN1}
diff --git a/README.md b/README.md
@@ -18,7 +18,7 @@ with a few modifications to match my own workflow.
Run the `Makefile` in order to install the script. It'll
be installed in `usr/local/bin/`. You can change the install path
-by editing the `INSTALL_PATH` variable in the `Makefile`.
+by editing the `BIN_DIR` variable in the `Makefile`.
```shell
$ cd path/to/autoblog/
@@ -41,7 +41,7 @@ structure. By default, all blog posts are stored in `blog/`.
`autoblog` will search for `<!--BLOG-->` inside `index.html` and
`rss.xml` in order to put the blog post listings and RSS feed
respectively. Inside `blogindex.html` however, it will search for
-`<!--BLOG [Month Year]-->` (e.g `<!--January 1800-->`).
+`<!--BLOG [Month Year]-->` (e.g `<!-- BLOG January 1800-->`).
A `template.html` file needs to exist in your main directory
in order for the script to run properly.