]> git.sommitrealweird.co.uk Git - bpgallery.git/blobdiff - bpgallery.sh
Bump version to indicate arch development
[bpgallery.git] / bpgallery.sh
index 27bbdc44ff15a557005964a7a1a9054c2f8d2915..61172310fbc08b96e092729aa513787e8a90f60b 100755 (executable)
@@ -19,7 +19,7 @@
 
 set -f
 
 
 set -f
 
-VERSION="1.0.0"
+VERSION="1.0.0+arch"
 
 function bpgallery_default_head() {
 cat <<END
 
 function bpgallery_default_head() {
 cat <<END
@@ -34,6 +34,8 @@ cat <<END
 END
 }
 
 END
 }
 
+declare -rf bpgallery_default_head
+
 function bpgallery_default_description() {
 cat <<END
        <h1>${TITLE}</h1>
 function bpgallery_default_description() {
 cat <<END
        <h1>${TITLE}</h1>
@@ -41,12 +43,16 @@ cat <<END
 END
 }
 
 END
 }
 
+declare -rf bpgallery_default_description
+
 function bpgallery_default_thumbsline() {
 cat << END
 <div class="thumbnail"><a href="$filename"><img src="icons/$filename" /></a><div class="caption">$caption</div></div>
 END
 }
 
 function bpgallery_default_thumbsline() {
 cat << END
 <div class="thumbnail"><a href="$filename"><img src="icons/$filename" /></a><div class="caption">$caption</div></div>
 END
 }
 
+declare -rf bpgallery_default_thumbsline
+
 function bpgallery_default_tail() {
 cat << END
 </body>
 function bpgallery_default_tail() {
 cat << END
 </body>
@@ -54,6 +60,8 @@ cat << END
 END
 }
 
 END
 }
 
+declare -rf bpgallery_default_tail
+
 function bpgallery_default_stylesheet() {
 cat <<END
 body {
 function bpgallery_default_stylesheet() {
 cat <<END
 body {
@@ -87,16 +95,26 @@ img {
 END
 }
 
 END
 }
 
+declare -rf bpgallery_default_stylesheet
+
+if [[ ! -z ${BPGALLERY_THEME} ]] ; then
+       declare -r BPGALLERY_THEME
+fi
+
+if [[ ! -z ${TITLE} ]] ; then
+       declare -r TITLE
+fi
+
 if [[ -e /usr/local/etc/bpgallery/config ]] ; then
 if [[ -e /usr/local/etc/bpgallery/config ]] ; then
-       . /usr/local/etc/bpgallery/config
+       . /usr/local/etc/bpgallery/config 2>/dev/null
 fi
 
 if [[ -e /etc/bpgallery/config ]] ; then
 fi
 
 if [[ -e /etc/bpgallery/config ]] ; then
-       . /etc/bpgallery/config
+       . /etc/bpgallery/config 2>/dev/null
 fi
 
 if [[ -e $HOME/.bpgallery.rc ]]; then
 fi
 
 if [[ -e $HOME/.bpgallery.rc ]]; then
-       . $HOME/.bpgallery.rc
+       . $HOME/.bpgallery.rc 2>/dev/null
 fi
 
 if [[ -z ${BPGALLERY_THEME} ]]; then
 fi
 
 if [[ -z ${BPGALLERY_THEME} ]]; then
@@ -104,11 +122,11 @@ if [[ -z ${BPGALLERY_THEME} ]]; then
 fi
 
 if [[ -e $HOME/.bpgallery.themes/${BPGALLERY_THEME} ]]; then
 fi
 
 if [[ -e $HOME/.bpgallery.themes/${BPGALLERY_THEME} ]]; then
-       . $HOME/.bpgallery.themes/${BPGALLERY_THEME}
+       . $HOME/.bpgallery.themes/${BPGALLERY_THEME} 2>/dev/null
 elif [[ -e /usr/local/etc/bpgallery/themes/${BPGALLERY_THEME} ]]; then
 elif [[ -e /usr/local/etc/bpgallery/themes/${BPGALLERY_THEME} ]]; then
-       . /usr/local/etc/bpgallery/themes/${BPGALLERY_THEME}
+       . /usr/local/etc/bpgallery/themes/${BPGALLERY_THEME} 2>/dev/null
 elif [[ -e /etc/bpgallery/themes/${BPGALLERY_THEME} ]]; then
 elif [[ -e /etc/bpgallery/themes/${BPGALLERY_THEME} ]]; then
-       . /etc/bpgallery/themes/${BPGALLERY_THEME}
+       . /etc/bpgallery/themes/${BPGALLERY_THEME} 2>/dev/null
 fi
 
 if [[ -z $TITLE ]]; then 
 fi
 
 if [[ -z $TITLE ]]; then 
@@ -167,10 +185,6 @@ if [[ -z $CAPTIONHEIGHT ]]; then
        CAPTIONHEIGHT=75
 fi
 
        CAPTIONHEIGHT=75
 fi
 
-if [[ -z $DESCRIPTION ]]; then
-       DESCRIPTION=""
-fi
-
 if declare -F "bpgallery_${BPGALLERY_THEME}_head" > /dev/null ; then
        BPGALLERY_HEAD_FUNCTION="bpgallery_${BPGALLERY_THEME}_head"
 else
 if declare -F "bpgallery_${BPGALLERY_THEME}_head" > /dev/null ; then
        BPGALLERY_HEAD_FUNCTION="bpgallery_${BPGALLERY_THEME}_head"
 else