tadd install target to makefile for ease of use - mars - superminimal static website framework
HTML git clone git://parazyd.org/mars.git
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 15c898df0fdfd2de22ba63e9394700faa8d822f6
DIR parent a08528384a2886ae244eb68592a72b8d875218a9
HTML Author: parazyd <parazyd@dyne.org>
Date: Fri, 17 Jun 2016 16:34:04 +0200
add install target to makefile for ease of use
Diffstat:
M Makefile | 7 +++++++
M README.md | 6 ++++++
M mars.sh | 1 +
3 files changed, 14 insertions(+), 0 deletions(-)
---
DIR diff --git a/Makefile b/Makefile
t@@ -4,3 +4,10 @@ push:
@./mars.sh push
clean:
@./mars.sh clean
+install:
+ cp -f Makefile ${DESTDIR}/Makefile
+ cp -f mars.sh ${DESTDIR}/mars.sh
+ cp -f rsync-exclude ${DESTDIR}/rsync-exclude
+ cp -f webtree ${DESTDIR}/webtree
+
+.PHONY: push clean install
DIR diff --git a/README.md b/README.md
t@@ -7,6 +7,12 @@ mars is imagined as a helper to generate static html pages out of your php
scripts. you are supposed to drop the files in this repository in the root of
the website where you manage your php scripts and use the provided makefile.
+for ease of use, the makefile provides an install target:
+
+```
+; DESTDIR=/path/to/your/webroot make install
+```
+
## configuration
edit the `webtree` file to reflect the directory tree of your website. the file
is commented with an example. also configure your webhost and the path to your
DIR diff --git a/mars.sh b/mars.sh
t@@ -78,6 +78,7 @@ push() {
print "${fg[green]}(*) rsyncing website...${reset_color}"
rsync -P -e 'ssh' -avul --delete --stats \
+ --size-only \
--exclude-from 'rsync-exclude' \
. $WEBHOST:$WEBROOT
}