mirror of
https://github.com/YunoHost-Apps/gotosocial_ynh.git
synced 2024-09-03 19:16:06 +02:00
fix restoration on a different CPU architecture
This commit is contained in:
parent
524bce27eb
commit
8496177feb
1 changed files with 8 additions and 6 deletions
|
@ -338,13 +338,15 @@ ynh_system_user_create --username="$app" --home_dir="$final_path"
|
|||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
ynh_script_progression --message="Upgrading source files..."
|
||||
# detect_arch comes from _common.sh / personnal helpers
|
||||
architecture="$(detect_arch)"
|
||||
|
||||
# compare is the system arch is different from the binary arch
|
||||
# if so, download the correct binary
|
||||
if [ "$architecture" != "$(file "$final_path"/gotosocial | cut -d ',' -f 2 | tr -d ' ')" ]
|
||||
then
|
||||
ynh_script_progression --message="Migrating binary architecture..."
|
||||
|
||||
# detect_arch comes from _common.sh / personnal helpers
|
||||
architecture=$(detect_arch)
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path" --source_id="$architecture" --keep="config.yaml"
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue