From d2a48d9146797d25425e98d8f195b55e2a4e9dcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Fri, 3 Apr 2020 15:26:18 +0200 Subject: [PATCH] Fix install - upgrade on arm --- scripts/install | 7 +++++++ scripts/upgrade | 15 ++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/scripts/install b/scripts/install index cae73e0..58285fe 100644 --- a/scripts/install +++ b/scripts/install @@ -182,6 +182,13 @@ mkdir -p $final_path if [ -n "$(uname -m | grep arm)" ] then ynh_setup_source --dest_dir=$final_path/ --source_id="armv7_$(lsb_release --codename --short)" + + # Fix multi-instance support + for f in $(ls $final_path/bin); do + if ! [[ $f =~ "__" ]]; then + ynh_replace_special_string --match_string='#!/opt/yunohost/matrix-synapse' --replace_string='#!'$final_path --target_file=$final_path/bin/$f + fi + done else # Install virtualenv if it don't exist test -e $final_path/bin/python3 || python3 -m venv $final_path diff --git a/scripts/upgrade b/scripts/upgrade index f5fc528..b4b88a1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -137,19 +137,20 @@ then if [ -n "$(uname -m | grep arm)" ] then - # Fix multi-instance support - for f in $(ls $final_path/bin); do - if ! [[ $f =~ "__" ]]; then - ynh_replace_special_string --match_string='#!/opt/yunohost/matrix-synapse' --replace_string='#!'$final_path --target_file=$final_path/bin/* - fi - done - # Clean old file, sometimes it could make some big issues if we don't do this!! ynh_secure_remove --file=$final_path/bin ynh_secure_remove --file=$final_path/lib ynh_secure_remove --file=$final_path/include ynh_secure_remove --file=$final_path/share + ynh_setup_source --dest_dir=$final_path/ --source_id="armv7_$(lsb_release --codename --short)" + + # Fix multi-instance support + for f in $(ls $final_path/bin); do + if ! [[ $f =~ "__" ]]; then + ynh_replace_special_string --match_string='#!/opt/yunohost/matrix-synapse' --replace_string='#!'$final_path --target_file=$final_path/bin/$f + fi + done else # Install virtualenv if it don't exist test -e $final_path/bin/python3 || python3 -m venv $final_path