dokuwiki-sandstorm/.sandstorm/build.sh

32 lines
857 B
Bash
Raw Permalink Normal View History

2015-11-16 03:57:07 +00:00
#!/bin/bash
# Checks if there's a composer.json, and if so, installs/runs composer.
set -euo pipefail
cd /opt/app/dokuwiki
if [ -f /opt/app/dokuwiki/composer.json ] ; then
if [ ! -f composer.phar ] ; then
curl -sS https://getcomposer.org/installer | php
fi
php composer.phar install
fi
rsync -a /opt/app/plugin/ /opt/app/dokuwiki/lib/plugins/sandstorm/
2020-06-13 21:49:54 +00:00
cp /opt/app/500.html /opt/app/dokuwiki/
cp /opt/app/preload.php /opt/app/dokuwiki/inc/
for p in /opt/app/dokuwiki/{conf,data,lib/plugins,lib/tpl}; do
if [ ! -e $p.orig ]; then
mv $p $p.orig
fi
if [ -e $p ]; then
rm -rf $p
fi
done
ln -sf /var/lib/dokuwiki/conf /opt/app/dokuwiki/conf
ln -sf /var/lib/dokuwiki/data /opt/app/dokuwiki/data
ln -sf /var/lib/dokuwiki/lib/plugins /opt/app/dokuwiki/lib/plugins
ln -sf /var/lib/dokuwiki/lib/tpl /opt/app/dokuwiki/lib/tpl