summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul C. Buetow (mars.fritz.box) <paul@buetow.org>2014-05-09 09:36:27 +0200
committerPaul C. Buetow (mars.fritz.box) <paul@buetow.org>2014-05-09 09:36:27 +0200
commit8966330880e0d6aa1ad59ae4599b0dfd3fb425b2 (patch)
tree09af35324fe3974c2c7ee56d0d1851b1c30a476d
parent9ed5d1e65a07ec1511a6599946b39c70f6441015 (diff)
refactor
-rw-r--r--.version2
-rw-r--r--debian/changelog6
-rw-r--r--docs/photoalbum.12
-rwxr-xr-xsrc/photoalbum.sh13
4 files changed, 13 insertions, 10 deletions
diff --git a/.version b/.version
index 0d91a54..896a713 100644
--- a/.version
+++ b/.version
@@ -1 +1 @@
-0.3.0
+0.3.1develop
diff --git a/debian/changelog b/debian/changelog
index 35267b3..9a72189 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+photoalbum (0.3.1develop) stable; urgency=low
+
+ * Dev version
+
+ -- Paul Buetow <paul@buetow.org> Wed, 07 May 2014 14:58:51 +0200
+
photoalbum (0.3.0) stable; urgency=low
* Add another template set: minimal
diff --git a/docs/photoalbum.1 b/docs/photoalbum.1
index 5544689..130a5c4 100644
--- a/docs/photoalbum.1
+++ b/docs/photoalbum.1
@@ -124,7 +124,7 @@
.\" ========================================================================
.\"
.IX Title "PHOTOALBUM 1"
-.TH PHOTOALBUM 1 "2014-05-07" "photoalbum 0.3.0" "User Commands"
+.TH PHOTOALBUM 1 "2014-05-07" "photoalbum 0.3.1develop" "User Commands"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/src/photoalbum.sh b/src/photoalbum.sh
index 4e67bc0..3e9b61d 100755
--- a/src/photoalbum.sh
+++ b/src/photoalbum.sh
@@ -3,7 +3,7 @@
# photoalbum (c) 2011 - 2014 by Paul C. Buetow
# http://photoalbum.buetow.org
-declare -r VERSION='PHOTOALBUMVERSION'
+declare -r VERSION='0.3.1develop'
declare -r DEFAULTRC=/etc/default/photoalbum
declare -r ARG1="${1}" ; shift
@@ -69,22 +69,20 @@ function generate() {
makescale
find "${DIST_DIR}" -type f -name \*.html -delete
+ dirs=( $(find "${DIST_DIR}/photos" -mindepth 1 -maxdepth 1 -type d | sort) )
# Figure out wether we want sub-albums or not
- # TODO: Refactor, store dirs in a Bash Array
- dirs=$(find "${DIST_DIR}/photos" -mindepth 1 -maxdepth 1 -type d | head | wc -l)
- if [[ "${SUB_ALBUMS}" != yes || ${dirs} -eq 0 ]]; then
+ if [[ "${SUB_ALBUMS}" != yes || ${#dirs[*]} -eq 0 ]]; then
makealbumhtml photos html thumbs ..
else
IS_SUBALBUM=yes
- find "${DIST_DIR}/photos" -mindepth 1 -maxdepth 1 -type d |
- while read dir; do
+ for dir in ${dirs[*]}; do
basename=$(basename "${dir}")
makealbumhtml "photos/${basename}" "html/${basename}" "thumbs/${basename}" ../..
done
# Create an album selection screen
- makealbumoverviewhtml
+ makealbumoverviewhtml <<< ${dirs[*]}
fi
# Create top level index/redirect page
@@ -213,7 +211,6 @@ function makealbumoverviewhtml() {
template header index
template header-first-add index
- find "${DIST_DIR}/photos" -mindepth 1 -maxdepth 1 -type d | sort |
while read dir; do
basename=$(basename "$dir")
ALBUM=$basename