+if [[ -e /usr/local/etc/bpgallery/config ]] ; then
+ . /usr/local/etc/bpgallery/config
+fi
+
+if [[ -e /etc/bpgallery/config ]] ; then
+ . /etc/bpgallery/config
+fi
+
+if [[ -e $HOME/.bpgallery.rc ]]; then
+ . $HOME/.bpgallery.rc
+fi
+
+if [[ -z ${BPGALLERY_THEME} ]]; then
+ BPGALLERY_THEME=default
+fi
+
+if [[ -e $HOME/.bpgallery.themes/${BPGALLERY_THEME} ]]; then
+ . $HOME/.bpgallery.themes/${BPGALLERY_THEME}
+elif [[ -e /usr/local/etc/bpgallery/themes/${BPGALLERY_THEME} ]]; then
+ . /usr/local/etc/bpgallery/themes/${BPGALLERY_THEME}
+elif [[ -e /etc/bpgallery/themes/${BPGALLERY_THEME} ]]; then
+ . /etc/bpgallery/themes/${BPGALLERY_THEME}
+fi
+