Enable the gnusocial sharings plugin
This commit is contained in:
parent
c8b1d70450
commit
4e2d8c711d
|
@ -208,6 +208,10 @@ MICROBLOG_BACKGROUND_IMAGE_URL=
|
|||
MICROBLOG_MARKDOWN_REPO="https://git.gnu.io/chimo/markdown.git"
|
||||
MICROBLOG_MARKDOWN_COMMIT='03c53942f94b3376f0946e6e1fe566cc21ccf232'
|
||||
|
||||
# Sharings plugin for the microblog
|
||||
SHARINGS_REPO="http://git.lasindias.club/manuel/Sharings"
|
||||
SHARINGS_COMMIT='d5c6c7f855d9afff9086c09ea706f38c859bc0d4'
|
||||
|
||||
# Domain name for hubzilla installation
|
||||
HUBZILLA_DOMAIN_NAME=
|
||||
HUBZILLA_CODE=
|
||||
|
@ -8677,6 +8681,62 @@ function install_gnu_social {
|
|||
echo 'install_gnu_social' >> $COMPLETION_FILE
|
||||
}
|
||||
|
||||
function install_gnu_social_plugin_sharings {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
if [ ! -d /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/local/plugins ]; then
|
||||
echo $'No local/plugins directory found for the microblog'
|
||||
exit 72945
|
||||
fi
|
||||
|
||||
# update to the next commit
|
||||
set_repo_commit /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/local/plugins "GNU Social sharings plugin commit" "$SHARINGS_COMMIT" $SHARINGS_REPO
|
||||
|
||||
if grep -Fxq "install_gnu_social_plugin_sharings" $COMPLETION_FILE; then
|
||||
return
|
||||
fi
|
||||
|
||||
cd /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/local/plugins
|
||||
git_clone $SHARINGS_REPO Sharings
|
||||
if [ ! -d /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/local/plugins/Sharings ]; then
|
||||
echo $'Unable to clone microblog sharings plugin'
|
||||
exit 36738
|
||||
fi
|
||||
|
||||
cd /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/local/plugins/Sharings
|
||||
git stash
|
||||
git checkout master
|
||||
git branch -D $SHARINGS_COMMIT
|
||||
git checkout $SHARINGS_COMMIT -b $SHARINGS_COMMIT
|
||||
|
||||
# enable the plugin
|
||||
if ! grep -q "addPlugin('Sharings');" /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/config.php; then
|
||||
echo "addPlugin('Sharings');" >> /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/config.php
|
||||
fi
|
||||
|
||||
cd cd /var/www/$MICROBLOG_DOMAIN_NAME/htdocs
|
||||
php scripts/checkschema.php
|
||||
cd /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/local/plugins/Sharings
|
||||
php scripts/seedsharings.php
|
||||
|
||||
# Languages
|
||||
cd /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/local/plugins/Sharings/locale/en/LC_MESSAGES
|
||||
msgfmt -o Sharings.mo Sharings.po
|
||||
cd /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/local/plugins/Sharings/locale/en_GB/LC_MESSAGES
|
||||
msgfmt -o Sharings.mo Sharings.po
|
||||
cd /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/local/plugins/Sharings/locale/en_US/LC_MESSAGES
|
||||
msgfmt -o Sharings.mo Sharings.po
|
||||
|
||||
if ! grep -q "GNU Social sharings plugin commit" $COMPLETION_FILE; then
|
||||
echo "GNU Social sharings plugin commit:$SHARINGS_COMMIT" >> $COMPLETION_FILE
|
||||
else
|
||||
sed -i "s|GNU Social sharings plugin commit.*|GNU Social sharings plugin commit:$SHARINGS_COMMIT|g" $COMPLETION_FILE
|
||||
fi
|
||||
echo 'install_gnu_social_plugin_sharings' >> $COMPLETION_FILE
|
||||
}
|
||||
|
||||
function expire_gnu_social_posts {
|
||||
# To prevent the database size from growing endlessly this script expires posts
|
||||
# after a number of months
|
||||
|
@ -10932,6 +10992,7 @@ install_gnu_social
|
|||
expire_gnu_social_posts
|
||||
install_gnu_social_theme
|
||||
install_gnu_social_markdown
|
||||
install_gnu_social_plugin_sharings
|
||||
install_rss_reader
|
||||
install_rss_reader_gnusocial
|
||||
install_rss_mobile_reader
|
||||
|
|
Loading…
Reference in New Issue