summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul C. Buetow (mars.fritz.box) <paul@buetow.org>2014-05-07 10:14:17 +0200
committerPaul C. Buetow (mars.fritz.box) <paul@buetow.org>2014-05-07 10:14:17 +0200
commit4ca143713c90a020fa3a3864f3d7acbdfe7c42cf (patch)
tree2f5295809caaeb547f1033e02971397d653933be
parente2b02d5f773a6d0d3523ce5ea9c64605b9257a40 (diff)
add makemake
-rw-r--r--docs/photoalbum.16
-rw-r--r--docs/photoalbum.pod5
-rw-r--r--docs/photoalbum.txt6
-rwxr-xr-xsrc/photoalbum.sh16
4 files changed, 29 insertions, 4 deletions
diff --git a/docs/photoalbum.1 b/docs/photoalbum.1
index c518477..5544689 100644
--- a/docs/photoalbum.1
+++ b/docs/photoalbum.1
@@ -124,7 +124,7 @@
.\" ========================================================================
.\"
.IX Title "PHOTOALBUM 1"
-.TH PHOTOALBUM 1 "2014-02-16" "photoalbum 0.3.0" "User Commands"
+.TH PHOTOALBUM 1 "2014-05-07" "photoalbum 0.3.0" "User Commands"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -134,6 +134,7 @@ photoalbum \- photoalbum is a minimal bash script for linux to generate static w
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
photoalbum clean|init|version|generate|all [rcfile]
+photoalbum makemake
.IP "clean" 4
.IX Item "clean"
Cleans up the working space
@@ -149,6 +150,9 @@ Generates the static photoalbum
.IP "all" 4
.IX Item "all"
This just runs 'clean init generate' right after another.
+.IP "makemake" 4
+.IX Item "makemake"
+Creates a Makefile and photoalbumrc in the current working directory.
.SS "\s-1RCFILE\s0"
.IX Subsection "RCFILE"
.SS "\s-1TUTORIAL\s0"
diff --git a/docs/photoalbum.pod b/docs/photoalbum.pod
index 791de48..914708d 100644
--- a/docs/photoalbum.pod
+++ b/docs/photoalbum.pod
@@ -5,6 +5,7 @@ photoalbum - photoalbum is a minimal bash script for linux to generate static we
=head1 SYNOPSIS
photoalbum clean|init|version|generate|all [rcfile]
+photoalbum makemake
=over
@@ -28,6 +29,10 @@ Generates the static photoalbum
This just runs 'clean init generate' right after another.
+=item makemake
+
+Creates a Makefile and photoalbumrc in the current working directory.
+
=back
=head2 RCFILE
diff --git a/docs/photoalbum.txt b/docs/photoalbum.txt
index fbb2d32..32722a7 100644
--- a/docs/photoalbum.txt
+++ b/docs/photoalbum.txt
@@ -3,7 +3,7 @@ NAME
static web photo albums.
SYNOPSIS
- photoalbum clean|init|version|generate|all [rcfile]
+ photoalbum clean|init|version|generate|all [rcfile] photoalbum makemake
clean
Cleans up the working space
@@ -19,6 +19,10 @@ SYNOPSIS
all This just runs 'clean init generate' right after another.
+ makemake
+ Creates a Makefile and photoalbumrc in the current working
+ directory.
+
RCFILE
TUTORIAL
* See if /etc/default/photoalbum fits your needs. If not, copy
diff --git a/src/photoalbum.sh b/src/photoalbum.sh
index 034a518..e467aeb 100755
--- a/src/photoalbum.sh
+++ b/src/photoalbum.sh
@@ -32,7 +32,7 @@ function init() {
}
function clean() {
- echo "Not deleting ${INCOMING_DIR}"
+ echo "Not deleting ${INCOMING_DIR} but ${DIST_DIR}"
[ -d "${DIST_DIR}" ] && rm -Rf "${DIST_DIR}"
}
@@ -184,6 +184,16 @@ function makedist() {
done
}
+function makemake() {
+ [ ! -f ./photoalbumrc ] && cp /etc/default/photoalbum ./photoalbumrc
+ cat <<MAKEFILE > ./Makefile
+all:
+ photoalbum all photoalbumrc
+clean:
+ photoalbum clean photoalbumrc
+MAKEFILE
+}
+
source "${RC}"
if [ -f ~/.photoalbumrc ]; then
@@ -192,7 +202,6 @@ fi
case "${ARG1}" in
all)
- clean
init
generate
;;
@@ -208,6 +217,9 @@ case "${ARG1}" in
version)
echo "This is Photoalbum Version ${VERSION}"
;;
+ makemake)
+ makemake
+ ;;
*)
usage
;;