mirror of
https://github.com/YunoHost-Apps/etherpad_mypads_ynh.git
synced 2024-09-03 18:36:09 +02:00
fix
This commit is contained in:
parent
ba08a4a4d4
commit
d2a874a3f6
2 changed files with 23 additions and 41 deletions
|
@ -6,7 +6,6 @@ source /usr/share/yunohost/helpers
|
|||
#=================================================
|
||||
# RESTORE THE APP MAIN DIR
|
||||
#=================================================
|
||||
#
|
||||
ynh_script_progression --message="Restoring the app main directory..." --weight=5
|
||||
|
||||
ynh_restore_file --origin_path="$install_dir"
|
||||
|
@ -28,7 +27,11 @@ chown $app:$app "$install_dir/credentials.json"
|
|||
ynh_script_progression --message="Restoring system configurations related to $app..."
|
||||
|
||||
ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||
ynh_use_nodejs
|
||||
|
||||
pushd $install_dir
|
||||
ynh_use_nodejs
|
||||
ynh_exec_warn_less npm install pnpm -g
|
||||
popd
|
||||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ ynh_mysql_connect_as --user=$db_user --password="$db_pwd" --database=$db_name \
|
|||
ynh_script_progression --message="Upgrading source files..." --weight=4
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$install_dir" --keep="settings.json credentials.json"
|
||||
ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="settings.json credentials.json"
|
||||
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:$app "$install_dir"
|
||||
|
@ -138,47 +138,26 @@ chown $app:$app "$install_dir/credentials.json"
|
|||
#=================================================
|
||||
|
||||
# If upgrading from an old version and table of content is there, remove it
|
||||
if ynh_compare_current_package_version --comparison lt --version 1.9.1~ynh3
|
||||
then
|
||||
pushd "$install_dir"
|
||||
if ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm ls 2>/dev/null | grep -q ep_table_of_contents
|
||||
then
|
||||
ynh_script_progression --message="Uninstalling ep_table_of_contents..." --weight=2
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm uninstall ep_table_of_contents
|
||||
fi
|
||||
popd
|
||||
fi
|
||||
#if ynh_compare_current_package_version --comparison lt --version 1.9.1~ynh3
|
||||
#then
|
||||
# pushd "$install_dir"
|
||||
# if ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm ls 2>/dev/null | grep -q ep_table_of_contents
|
||||
# then
|
||||
# ynh_script_progression --message="Uninstalling ep_table_of_contents..." --weight=2
|
||||
# ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm uninstall ep_table_of_contents
|
||||
# fi
|
||||
# popd
|
||||
#fi
|
||||
|
||||
ynh_script_progression --message="Installing Etherpad plugins..." --weight=10
|
||||
|
||||
pushd "$install_dir"
|
||||
# Add Left/Center/Right/Justify to lines of text in a pad
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_align@${ep_align_version}
|
||||
# Framapad - Adds author names to span titles
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_author_hover@${ep_author_hover_version}
|
||||
# Framapad - Adds comments on sidebar and link it to the text.
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_comments_page@${ep_comments_page_version}
|
||||
# Framapad - Displays paragraphs, sentences, words and characters counts.
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_countable@${ep_countable_version}
|
||||
# Framapad - Delete pads which were never edited
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_delete_empty_pads@${ep_delete_empty_pads_version}
|
||||
# Framapad - Apply colors to fonts
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_font_color@${ep_font_color_version}
|
||||
# Framapad - Adds heading support to Etherpad Lite.
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_headings2@${ep_headings2_version}
|
||||
# Framapad - Edit and Export as Markdown in Etherpad
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_markdown@${ep_markdown_version}
|
||||
if [ $mypads -eq 1 ]; then
|
||||
# Framapad - Groups and private pads for Etherpad
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_mypads@${mypads_version}
|
||||
fi
|
||||
# Framapad - Add support to do 'Spell checking'
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_spellcheck@${ep_spellcheck_version}
|
||||
# Framapad - Add support for Subscript and Superscript
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_subscript_and_superscript@${ep_subscript_and_superscript_version}
|
||||
# Framapad - User Pad Contents font size can be set in settings, this does not effect other peoples views
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_font_size@${ep_font_size_version}
|
||||
popd
|
||||
#pushd "$install_dir"
|
||||
# ynh_exec_warn_less npm install pnpm -g
|
||||
# ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm run install-plugins ep_align@${ep_align_version} ep_author_hover@${ep_author_hover_version} ep_comments_page@${ep_comments_page_version} ep_countable@${ep_countable_version} ep_delete_empty_pads@${ep_delete_empty_pads_version} ep_font_color@${ep_font_color_version} ep_headings2@${ep_headings2_version} ep_markdown@${ep_markdown_version} ep_spellcheck@${ep_spellcheck_version} ep_subscript_and_superscript@${ep_subscript_and_superscript_version} ep_font_size@${ep_font_size_version}
|
||||
# if [ $mypads -eq 1 ]; then
|
||||
# ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm run install-plugins ep_mypads@${mypads_version}
|
||||
# fi
|
||||
#popd
|
||||
|
||||
#=================================================
|
||||
# UPGRADE NPM MODULES
|
||||
|
|
Loading…
Add table
Reference in a new issue