From 509199dcf8a0e3f363bad3b9690e62d480baf2dc Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 5 May 2021 00:01:16 +0200 Subject: [PATCH] Fix triple mypads links --- scripts/install | 4 ++-- scripts/upgrade | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index 06a3063..9399bc2 100644 --- a/scripts/install +++ b/scripts/install @@ -280,9 +280,9 @@ then ynh_replace_string --match_string="^ *\"FOOTER\": .*2.0" --replace_string="& | Etherpad admin" --target_file=$final_path/node_modules/ep_mypads/static/l10n/en.json ynh_replace_string --match_string="^ *\"FOOTER\": .*2.0" --replace_string="& | Etherpad admin" --target_file=$final_path/node_modules/ep_mypads/static/l10n/fr.json - # Find the /div just after the field to open a pad + ## Find the /div just after the field to open a pad #mod_line=$(grep -nA5 "index.createOpenPad" $final_path/src/templates/index.html | grep "" | cut -d '-' -f 1) - # In order to add a link to mypads plugin. + ## In order to add a link to MyPads plugin. #sed -i "$mod_line s@div>@&\n\t

MyPads
@" $final_path/src/templates/index.html sed -i '157i

MyPads
' $final_path/src/templates/index.html fi diff --git a/scripts/upgrade b/scripts/upgrade index 6724a45..8594965 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -440,10 +440,11 @@ fi if [ "$upgrade_type" == "UPGRADE_APP" ] && [ $mypads -eq 1 ] then - # Find the /div just after the field to open a pad - mod_line=$(grep -nA5 "index.createOpenPad" $final_path/src/templates/index.html | grep "" | cut -d '-' -f 1) - # In order to add a link to mypads plugin. - sed -i "$mod_line s@div>@&\n\t

MyPads
@" $final_path/src/templates/index.html + # # Find the /div just after the field to open a pad + # mod_line=$(grep -nA5 "index.createOpenPad" $final_path/src/templates/index.html | grep "" | cut -d '-' -f 1) + # # In order to add a link to mypads plugin. + # sed -i "$mod_line s@div>@&\n\t

MyPads
@" $final_path/src/templates/index.html + sed -i '157i

MyPads
' $final_path/src/templates/index.html fi #=================================================