fix(moodle): upgrade plugins with develop branch
parent
2e09fc52a5
commit
28957f1854
38
dd-ctl
38
dd-ctl
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
if [ ! -d "custom" ]; then echo "You need to copy custom.sample to custom folder and adapt it to your needs." && exit 1; fi
|
if [ ! -d "custom" ]; then echo "You need to copy custom.sample to custom folder and adapt it to your needs." && exit 1; fi
|
||||||
if [ ! -f "digitaldemocratic.conf" ]; then echo "You need to copy digitaldemocratic.conf.sample to digitaldemocratic.conf and adapt" && exit 1; fi
|
if [ ! -f "digitaldemocratic.conf" ]; then echo "You need to copy digitaldemocratic.conf.sample to digitaldemocratic.conf and adapt" && exit 1; fi
|
||||||
|
@ -322,34 +322,58 @@ upgrade_plugins_moodle(){
|
||||||
rm -rf /tmp/moodle/auth/moodle-auth_saml2-role_map
|
rm -rf /tmp/moodle/auth/moodle-auth_saml2-role_map
|
||||||
rm auth_saml2.zip
|
rm auth_saml2.zip
|
||||||
|
|
||||||
|
if [[ "$MOODLE_PLUGIN_TRESIPUNTSHARE" == *"develop"* ]]; then
|
||||||
|
BRANCH=develop
|
||||||
|
else
|
||||||
|
BRANCH=master
|
||||||
|
fi
|
||||||
curl --location $MOODLE_PLUGIN_TRESIPUNTSHARE > tresipuntshare.zip
|
curl --location $MOODLE_PLUGIN_TRESIPUNTSHARE > tresipuntshare.zip
|
||||||
unzip tresipuntshare.zip -d /tmp/moodle/mod/
|
unzip tresipuntshare.zip -d /tmp/moodle/mod/
|
||||||
mv /tmp/moodle/mod/moodle_mod_tresipuntshare-master /tmp/moodle/mod/tresipuntshare
|
mv /tmp/moodle/mod/moodle_mod_tresipuntshare-$BRANCH /tmp/moodle/mod/tresipuntshare
|
||||||
rm tresipuntshare.zip
|
rm tresipuntshare.zip
|
||||||
|
|
||||||
|
if [[ "$MOODLE_PLUGIN_TRESIPUNTVIDEO" == *"develop"* ]]; then
|
||||||
|
BRANCH=develop
|
||||||
|
else
|
||||||
|
BRANCH=master
|
||||||
|
fi
|
||||||
curl --location $MOODLE_PLUGIN_TRESIPUNTVIDEO > tresipuntvideo.zip
|
curl --location $MOODLE_PLUGIN_TRESIPUNTVIDEO > tresipuntvideo.zip
|
||||||
unzip tresipuntvideo.zip -d /tmp/moodle/mod/
|
unzip tresipuntvideo.zip -d /tmp/moodle/mod/
|
||||||
mv /tmp/moodle/mod/moodle_mod_tresipuntvideo-master /tmp/moodle/mod/tresipuntvideo
|
mv /tmp/moodle/mod/moodle_mod_tresipuntvideo-$BRANCH /tmp/moodle/mod/tresipuntvideo
|
||||||
rm tresipuntvideo.zip
|
rm tresipuntvideo.zip
|
||||||
|
|
||||||
|
if [[ "$MOODLE_PLUGIN_TRESIPUNTAUDIO" == *"develop"* ]]; then
|
||||||
|
BRANCH=develop
|
||||||
|
else
|
||||||
|
BRANCH=master
|
||||||
|
fi
|
||||||
curl --location $MOODLE_PLUGIN_TRESIPUNTAUDIO > tresipuntaudio.zip
|
curl --location $MOODLE_PLUGIN_TRESIPUNTAUDIO > tresipuntaudio.zip
|
||||||
unzip tresipuntaudio.zip -d /tmp/moodle/mod/
|
unzip tresipuntaudio.zip -d /tmp/moodle/mod/
|
||||||
mv /tmp/moodle/mod/moodle_mod_tresipuntaudio-master /tmp/moodle/mod/tresipuntaudio
|
mv /tmp/moodle/mod/moodle_mod_tresipuntaudio-$BRANCH /tmp/moodle/mod/tresipuntaudio
|
||||||
rm tresipuntaudio.zip
|
rm tresipuntaudio.zip
|
||||||
|
|
||||||
|
if [[ "$MOODLE_PLUGIN_ASSIGNSUBMISSION" == *"develop"* ]]; then
|
||||||
|
BRANCH=develop
|
||||||
|
else
|
||||||
|
BRANCH=master
|
||||||
|
fi
|
||||||
curl --location $MOODLE_PLUGIN_ASSIGNSUBMISSION > assignsubmission_tipnc.zip
|
curl --location $MOODLE_PLUGIN_ASSIGNSUBMISSION > assignsubmission_tipnc.zip
|
||||||
unzip assignsubmission_tipnc.zip -d /tmp/moodle/mod/assign/submission/
|
unzip assignsubmission_tipnc.zip -d /tmp/moodle/mod/assign/submission/
|
||||||
mv /tmp/moodle/mod/assign/submission/moodle_assignsubmission_tipnc-master /tmp/moodle/mod/assign/submission/tipnc
|
mv /tmp/moodle/mod/assign/submission/moodle_assignsubmission_tipnc-$BRANCH /tmp/moodle/mod/assign/submission/tipnc
|
||||||
rm assignsubmission_tipnc.zip
|
rm assignsubmission_tipnc.zip
|
||||||
|
|
||||||
curl --location $MOODLE_PLUGIN_TRESIPUNTMODSPEND > block_tresipuntmodspend.zip
|
curl --location $MOODLE_PLUGIN_TRESIPUNTMODSPEND > block_tresipuntmodspend.zip
|
||||||
unzip block_tresipuntmodspend.zip -d /tmp/moodle/blocks/
|
unzip block_tresipuntmodspend.zip -d /tmp/moodle/blocks/
|
||||||
rm block_tresipuntmodspend.zip
|
rm block_tresipuntmodspend.zip
|
||||||
|
|
||||||
|
if [[ "$MOODLE_THEME_CBE" == *"develop"* ]]; then
|
||||||
|
BRANCH=develop
|
||||||
|
else
|
||||||
|
BRANCH=master
|
||||||
|
fi
|
||||||
curl --location $MOODLE_THEME_CBE > tresipunt_theme_cbe.zip
|
curl --location $MOODLE_THEME_CBE > tresipunt_theme_cbe.zip
|
||||||
unzip tresipunt_theme_cbe.zip -d /tmp/moodle/theme/cbe/
|
unzip tresipunt_theme_cbe.zip -d /tmp/moodle/theme/cbe/
|
||||||
mv /tmp/moodle/theme/cbe/moodle_theme_cbe-master/* /tmp/moodle/theme/cbe/
|
mv /tmp/moodle/theme/cbe/moodle_theme_cbe-$BRANCH/* /tmp/moodle/theme/cbe/
|
||||||
mv /tmp/moodle/theme/cbe/moodle_theme_cbe-develop/* /tmp/moodle/theme/cbe/
|
|
||||||
rm tresipunt_theme_cbe.zip
|
rm tresipunt_theme_cbe.zip
|
||||||
|
|
||||||
mkdir -p /tmp/moodle/local/tresipuntimportgc
|
mkdir -p /tmp/moodle/local/tresipuntimportgc
|
||||||
|
|
Loading…
Reference in New Issue