1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/phpbb_ynh.git synced 2024-09-03 19:56:36 +02:00

Update upgrade

This commit is contained in:
ericgaspar 2021-12-14 10:18:58 +01:00
parent 822a7fc1a4
commit 7541fb560a
No known key found for this signature in database
GPG key ID: 574F281483054D44

View file

@ -77,26 +77,28 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
then then
ynh_script_progression --message="Upgrading source files..." --weight=5 ynh_script_progression --message="Upgrading source files..." --weight=5
new_phpbb_dir=$(mktemp -d) # new_phpbb_dir=$(mktemp -d)
# Download, check integrity, uncompress and patch the source from app.src # # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$new_phpbb_dir" # ynh_setup_source --dest_dir="$new_phpbb_dir"
ynh_secure_remove --file="$new_phpbb_dir/config.php" # ynh_secure_remove --file="$new_phpbb_dir/config.php"
ynh_secure_remove --file="$new_phpbb_dir/images" # ynh_secure_remove --file="$new_phpbb_dir/images"
ynh_secure_remove --file="$new_phpbb_dir/files" # ynh_secure_remove --file="$new_phpbb_dir/files"
ynh_secure_remove --file="$new_phpbb_dir/store" # ynh_secure_remove --file="$new_phpbb_dir/store"
old_phpbb_dir=$(mktemp -d) # old_phpbb_dir=$(mktemp -d)
mv $final_path/* $old_phpbb_dir # mv $final_path/* $old_phpbb_dir
mv $old_phpbb_dir/config.php $final_path/ # mv $old_phpbb_dir/config.php $final_path/
mv $old_phpbb_dir/images/ $final_path/ # mv $old_phpbb_dir/images/ $final_path/
mv $old_phpbb_dir/files/ $final_path/ # mv $old_phpbb_dir/files/ $final_path/
mv $old_phpbb_dir/store/ $final_path/ # mv $old_phpbb_dir/store/ $final_path/
mv $new_phpbb_dir/* $final_path # mv $new_phpbb_dir/* $final_path
ynh_secure_remove --file="$old_phpbb_dir" # ynh_secure_remove --file="$old_phpbb_dir"
ynh_secure_remove --file="$new_phpbb_dir" # ynh_secure_remove --file="$new_phpbb_dir"
ynh_setup_source --dest_dir="$final_path" --keep="$final_path/config.php $final_path/images $final_path/files $final_path/store"
fi fi