summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Buetow (centauri) <puppet@mx.buetow.org>2015-05-23 21:56:06 +0100
committerPaul Buetow (centauri) <puppet@mx.buetow.org>2015-05-23 21:56:06 +0100
commitd61778d5581229411b6ceddd6b5da584c3f41c4b (patch)
tree705cdae1209f468da6b864d6105572d576e90a0d /src
parent3c3eb7afd103011fb0bedabb85b2c49b75f8d3fa (diff)
parenta14add04680c5ad04774df753b93bfe3fe05d8f3 (diff)
Merge remote-tracking branch 'remotes/github/develop' into develop
Diffstat (limited to 'src')
-rwxr-xr-xsrc/photoalbum.sh24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/photoalbum.sh b/src/photoalbum.sh
index 82c086a..306090f 100755
--- a/src/photoalbum.sh
+++ b/src/photoalbum.sh
@@ -3,10 +3,10 @@
# photoalbum (c) 2011 - 2014 by Paul C. Buetow
# http://photoalbum.buetow.org
-declare -r VERSION='PHOTOALBUMVERSION'
-declare -r DEFAULTRC=/etc/default/photoalbum
-declare -r ARG1="${1}" ; shift
-declare RC_FILE="${1}" ; shift
+readonly VERSION='PHOTOALBUMVERSION'
+readonly DEFAULTRC=/etc/default/photoalbum
+readonly ARG1="${1}" ; shift
+declare RC_FILE="${1}" ; shift
function usage {
cat - <<USAGE >&2
@@ -29,7 +29,7 @@ MAKEFILE
function tarball {
# Cleanup tarball from prev run if any
find "${DIST_DIR}" -maxdepth 1 -type f -name \*.tar -delete
- declare -r base=$(basename "${INCOMING_DIR}")
+ readonly base=$(basename "${INCOMING_DIR}")
echo "Creating tarball ${DIST_DIR}/${tarball_name} from ${INCOMING_DIR}"
cd $(dirname "${INCOMING_DIR}")
@@ -37,10 +37,10 @@ function tarball {
cd - &>/dev/null
}
-function template {
- declare -r template=${1} ; shift
- declare -r html=${1} ; shift
- declare -r dist_html="${DIST_DIR}/${html_dir}"
+function template() {
+ readonly template=${1} ; shift
+ readonly html=${1} ; shift
+ readonly dist_html="${DIST_DIR}/${html_dir}"
# Creating ${dist_html}/${html}.html from ${template}.tmpl
[ ! -d "${dist_html}" ] && mkdir -p "${dist_html}"
@@ -184,9 +184,9 @@ function generate {
fi
if [ "${TARBALL_INCLUDE}" = yes ]; then
- declare -r base=$(basename "${INCOMING_DIR}")
- declare -r now=$(date +'%Y-%m-%d-%H%M%S')
- declare -r tarball_name="${base}-${now}${TARBALL_SUFFIX}"
+ readonly base=$(basename "${INCOMING_DIR}")
+ readonly now=$(date +'%Y-%m-%d-%H%M%S')
+ readonly tarball_name="${base}-${now}${TARBALL_SUFFIX}"
fi
test ! -d "${DIST_DIR}/photos" && mkdir -p "${DIST_DIR}/photos"