#!/usr/bin/with-contenv bash # fix for linting declare config # Set version PHOTOSHOW_COMMIT=$(cat /version.txt) # install photoshow if [ ! -d "/config/www/PhotoShow/.git" ]; then echo "fetching photoshow files from github" git clone https://github.com/thibaud-rohmer/PhotoShow.git /config/www/PhotoShow git --git-dir=/config/www/PhotoShow/.git --work-tree=/config/www/PhotoShow checkout ${PHOTOSHOW_COMMIT} sed -i \ -e "s#$config->photos_dir.*#$config->photos_dir = \"/Pictures\";#g" \ -e "s#$config->ps_generated.*#$config->ps_generated = \"/Thumbs\";#g" \ -e "s#.*config->timezone.*#\$config->timezone = \"${TZ}\";#g" \ /config/www/PhotoShow/config.php # patch in fixed keyboard.js file cp /defaults/keyboard.js /config/www/PhotoShow/src/js/keyboard.js fi # permissions chown -R abc:abc \ /config/www/PhotoShow \ /Thumbs