mirror of
https://github.com/YunoHost-Apps/minetest_ynh.git
synced 2024-09-03 20:36:00 +02:00
Fixed upgrade and restore
This commit is contained in:
parent
c47995c400
commit
e2e7b9082d
2 changed files with 4 additions and 14 deletions
|
@ -33,8 +33,7 @@ home_path=$(ynh_app_setting_get --app=$app --key=home_path)
|
|||
#=================================================
|
||||
ynh_print_info --message="Validating restoration parameters..."
|
||||
|
||||
ynh_webpath_available --domain=$domain \
|
||||
|| ynh_die --message="Path not available: ${domain}"
|
||||
ynh_webpath_register --app=$app --domain=$domain --path_url=/
|
||||
test ! -d $final_path \
|
||||
|| ynh_die --message="There is already a directory: $final_path "
|
||||
|
||||
|
|
|
@ -55,18 +55,6 @@ ynh_clean_setup () {
|
|||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# CHECK THE PATH
|
||||
#=================================================
|
||||
|
||||
# Normalize the URL path syntax
|
||||
# N.B. : this is for app installations before YunoHost 2.7
|
||||
# where this value might be something like /foo/ or foo/
|
||||
# instead of /foo ....
|
||||
# If nobody installed your app before 2.7, then you may
|
||||
# safely remove this line
|
||||
path_url=$(ynh_normalize_url_path --path_url=/)
|
||||
|
||||
#=================================================
|
||||
# STANDARD UPGRADE STEPS
|
||||
#=================================================
|
||||
|
@ -74,6 +62,9 @@ path_url=$(ynh_normalize_url_path --path_url=/)
|
|||
#=================================================
|
||||
ynh_print_info --message="Upgrading source files..."
|
||||
|
||||
# Remove old install
|
||||
ynh_secure_remove --file="$final_path"
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path"
|
||||
|
||||
|
|
Loading…
Reference in a new issue