set -e
set -f
-VERSION="1.1+arch"
+VERSION="1.1.0"
function bpgallery_default_head() {
cat <<END
INDEXDOCUMENT=index.html
fi
-if [[ $GENERATEPAGESFORFULLSIZE != 0 ]]; then
- if declare -F "bpgallery_${BPGALLERY_THEME}_page" > /dev/null ; then
- BPGALLERY_PAGE_FUNCTION="bpgallery_${BPGALLERY_THEME}_page"
- else
- BPGALLERY_PAGE_FUNCTION="bpgallery_default_page"
- fi
+if declare -F "bpgallery_${BPGALLERY_THEME}_page" > /dev/null ; then
+ BPGALLERY_PAGE_FUNCTION="bpgallery_${BPGALLERY_THEME}_page"
+else
+ BPGALLERY_PAGE_FUNCTION="bpgallery_default_page"
fi
if declare -F "bpgallery_${BPGALLERY_THEME}_head" > /dev/null ; then
addlink=""
if [[ $GENERATEPAGESFORFULLSIZE != 0 ]]; then
- addlink=${currentimage}${extra}.html
+ if [[ $addlinks == 1 ]]; then
+ addlink=${currentimage}.html
+ else
+ addlink=${currentimage}${extra}.html
+ fi
else
addlink=${currentimage}
fi
- if [[ $addlinks == 1 ]]; then
- addlink=${currentimage}.html
- else
- addlink=${currentimage}${extra}.html
- fi
-
previouspage=$currentpage
currentpage=$nextpage
if [[ $addlinks == 1 ]]; then
nextpage=${nextimage}.html
fi
filename=${extradir}${currentimage}
- generate_general_page "$previouspage" "$currentpage" "$nextpage" $addlink
+ echo "'$previouspage' '$currentpage' '$nextpage' '$addlink'" >> /tmp/bpgallery-tmp.log
+ if [ "x$currentpage" != "x" ]; then
+ generate_general_page "$previouspage" "$currentpage" "$nextpage" $addlink
+ fi
$ECHOCOMMAND $nextimage
done | tail -n 2 | (
read previouspage
addlink=""
if [[ $GENERATEPAGESFORFULLSIZE != 0 ]]; then
- addlink=${currentpage}.html
+ if [[ $addlinks == 1 ]]; then
+ addlink=${currentpage}.html
+ else
+ addlink=${currentpage}${extra}.html
+ fi
else
addlink=${currentpage}
fi
- if [[ $addlinks == 1 ]]; then
- addlink=${currentpage}.html
- else
- addlink=${currentpage}${extra}.html
- fi
-
filename=${extradir}${currentpage}
if [[ $addlinks == 1 ]]; then
currentpage=${currentpage}${extra}.html
function generate_general_page() {
+ echo 'Generating the page...' >> /tmp/bpgallery-tmp.log
+
if [[ -z $1 ]]; then
previouspage=""
fi