summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul C. Buetow (mars.fritz.box) <paul@buetow.org>2014-05-07 13:16:26 +0200
committerPaul C. Buetow (mars.fritz.box) <paul@buetow.org>2014-05-07 13:16:26 +0200
commit14731e9c43403f0961b086920bd331235487ce50 (patch)
tree620f2d8dffd3b36147818822258f8fd4c7e27b11 /src
parentbc94071935a1bb072fc665798c6ec9c0b41d6222 (diff)
can enable and disable sub-albums
Diffstat (limited to 'src')
-rw-r--r--src/photoalbum.default.conf2
-rwxr-xr-xsrc/photoalbum.sh2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/photoalbum.default.conf b/src/photoalbum.default.conf
index 2a85fc7..160a8ed 100644
--- a/src/photoalbum.default.conf
+++ b/src/photoalbum.default.conf
@@ -8,6 +8,8 @@ MAXPREVIEWS=100
# Diverse directories, need to be full paths, not relative!
INCOMING_DIR=$(pwd)/incoming
+# Set to yes if per directory sub-albums are wanted
+SUB_ALBUMS=no
DIST_DIR=$(pwd)/dist
TEMPLATE_DIR=/usr/share/photoalbum/templates/default
#TEMPLATE_DIR=/usr/share/photoalbum/templates/minimal
diff --git a/src/photoalbum.sh b/src/photoalbum.sh
index 6099e5e..8334872 100755
--- a/src/photoalbum.sh
+++ b/src/photoalbum.sh
@@ -72,7 +72,7 @@ function generate() {
# Figure out wether we want sub-albums or not
dirs=$(find "${DIST_DIR}/photos" -mindepth 1 -maxdepth 1 -type d | head | wc -l)
- if [ ${dirs} -eq 0 ]; then
+ if [[ "${SUB_ALBUMS}" != yes || ${dirs} -eq 0 ]]; then
makehtml photos html thumbs ..
else
find "${DIST_DIR}/photos" -mindepth 1 -maxdepth 1 -type d |