1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/etherpad_mypads_ynh.git synced 2024-09-03 18:36:09 +02:00

Update upgrade

This commit is contained in:
ericgaspar 2021-05-01 23:39:39 +02:00
parent 7a1639e1d9
commit bb5601ff35
No known key found for this signature in database
GPG key ID: 574F281483054D44

View file

@ -247,28 +247,67 @@ pushd $final_path
ynh_use_nodejs
ynh_exec_as $app env "$ynh_node_load_PATH" src/bin/installDeps.sh
#ynh_exec_warn_less npm cache clean --force
ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm cache clean --force
while read node_module
do
# Ignore ep_etherpad-lite, this part is updated before in this script.
if [ "$node_module" = "ep_etherpad-lite" ]; then
continue
fi
echo "Update $node_module"
# Build the name of the variable with the version.
module_version=${node_module}_version
# Get the content of the variable (from the file _variables)
module_version=${!module_version:-}
# If the module has no version stored in a variable into the file, keep it empty.
# That way, the upgrade will not be specific to a version.
## Otherwise, add @ before the version number to force the upgrade to this version.
if [ -n "${module_version}" ]; then
module_version=@${module_version}
fi
ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm install --upgrade ${node_module}${module_version} || true
done <<< "$(ls -1 "$final_path/node_modules" | grep "^ep_")"
# ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm cache clean --force
# while read node_module
# do
# # Ignore ep_etherpad-lite, this part is updated before in this script.
# if [ "$node_module" = "ep_etherpad-lite" ]; then
# continue
# fi
# echo "Update $node_module"
# # Build the name of the variable with the version.
# module_version=${node_module}_version
# # Get the content of the variable (from the file _variables)
# module_version=${!module_version:-}
# # If the module has no version stored in a variable into the file, keep it empty.
# # That way, the upgrade will not be specific to a version.
# ## Otherwise, add @ before the version number to force the upgrade to this version.
# if [ -n "${module_version}" ]; then
# module_version=@${module_version}
# fi
# ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm install --upgrade ${node_module}${module_version} || true
# done <<< "$(ls -1 "$final_path/node_modules" | grep "^ep_")"
popd
#=================================================
# INSTALL FRAMAPAD'S PLUGINS
#=================================================
ynh_script_progression --message="Installing Etherpad plugins..." --weight=90
pushd "$final_path"
# Add Left/Center/Right/Justify to lines of text in a pad
npm install ep_align@${ep_align_version} >> $install_log 2>&1
# Framapad - Adds author names to span titles
npm install ep_author_hover@${ep_author_hover_version} >> $install_log 2>&1
# Automatically disconnects user after some period of time (Prevent server overload)
npm install ep_automatic_logut@${ep_automatic_logut_version} >> $install_log 2>&1
# Framapad - Adds comments on sidebar and link it to the text.
npm install ep_comments_page@${ep_comments_page_version} >> $install_log 2>&1
# Framapad - Displays paragraphs, sentences, words and characters counts.
npm install ep_countable@${ep_countable_version} >> $install_log 2>&1
# Framapad - Delete pads which were never edited
npm install ep_delete_empty_pads@${ep_delete_empty_pads_version} >> $install_log 2>&1
# Framapad - Apply colors to fonts
npm install ep_font_color@${ep_font_color_version} >> $install_log 2>&1
# Framapad - Adds heading support to Etherpad Lite.
npm install ep_headings2@${ep_headings2_version} >> $install_log 2>&1
# Framapad - Edit and Export as Markdown in Etherpad
npm install ep_markdown@${ep_markdown_version} >> $install_log 2>&1
if [ $mypads -eq 1 ]; then
# Framapad - Groups and private pads for etherpad
npm install ep_mypads@${mypads_version} >> $install_log 2>&1
fi
# Framapad - Add support to do 'Spell checking'
npm install ep_spellcheck@${ep_spellcheck_version} >> $install_log 2>&1
# Framapad - Add support for Subscript and Superscript
npm install ep_subscript_and_superscript@${ep_subscript_and_superscript_version} >> $install_log 2>&1
# Framapad - View a table of contents for your pad
npm install ep_table_of_contents@${ep_table_of_contents_version} >> $install_log 2>&1
# Framapad - User Pad Contents font size can be set in settings, this does not effect other peoples views
npm install ep_font_size@${ep_font_size_version} >> $install_log 2>&1
popd
chown -R $app: $final_path/node_modules
#=================================================
# SPECIFIC UPGRADE
#=================================================