Add in a setable path for themes
[bpgallery.git] / bpgallery.sh
index 8c186bb2f1ed04038b20839cc96d1dd6c5eedf1f..165048558e00d169dae5d696b31d98eea902061c 100755 (executable)
@@ -150,7 +150,10 @@ if [[ -z ${BPGALLERY_THEME} ]]; then
        BPGALLERY_THEME=default
 fi
 
-if [[ -e $HOME/.bpgallery.themes/${BPGALLERY_THEME} ]]; then
+if [[ ! -z ${BPGALLERY_THEME_DIR} ]] && \
+       [[ -e ${BPGALLERY_THEME_DIR}/${BPGALLERY_THEME} ]]; then
+       . ${BPGALLERY_THEME_DIR/${BPGALLERY_THEME} 2>/dev/null
+elif [[ -e $HOME/.bpgallery.themes/${BPGALLERY_THEME} ]]; then
        . $HOME/.bpgallery.themes/${BPGALLERY_THEME} 2>/dev/null
 elif [[ -e /usr/local/etc/bpgallery/themes/${BPGALLERY_THEME} ]]; then
        . /usr/local/etc/bpgallery/themes/${BPGALLERY_THEME} 2>/dev/null