diff options
| author | Paul Buetow <paul@buetow.org> | 2021-01-24 14:44:20 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2021-01-24 14:44:20 +0000 |
| commit | 85dfedb628afb1c39ec91197e21597ff81e22e7e (patch) | |
| tree | cb0159ee70ddcd359786112568464483e9571063 /src | |
| parent | 72fa08e84a5e6df2c6d3ca6f67bc6e8b9cb08ce2 (diff) | |
| parent | d61778d5581229411b6ceddd6b5da584c3f41c4b (diff) | |
merge develop
Diffstat (limited to 'src')
| -rwxr-xr-x | src/photoalbum.sh | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/photoalbum.sh b/src/photoalbum.sh index 80fdf1e..2295201 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 usage () { cat - <<USAGE >&2 @@ -29,7 +29,7 @@ MAKEFILE 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 @@ tarball () { cd - &>/dev/null } -template () { - declare -r template=${1} ; shift - declare -r html=${1} ; shift - declare -r dist_html="${DIST_DIR}/${html_dir}" +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 @@ 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" |
