1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/fab-manager_ynh.git synced 2024-09-03 18:36:16 +02:00

Update upgrade: no need to cp the .yml file to a tmpdir ... --keep already does this job

This commit is contained in:
Alexandre Aubin 2024-01-06 18:44:09 +01:00 committed by Félix Piédallu
parent 16496a25d4
commit 64d7d6320b

View file

@ -55,17 +55,8 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
then then
ynh_script_progression --message="Upgrading source files..." --weight=1 ynh_script_progression --message="Upgrading source files..." --weight=1
tmpdir="$(mktemp -d)"
cp "$install_dir/config/secrets.yml" "$tmpdir/secrets.yml"
cp "$install_dir/config/database.yml" "$tmpdir/database.yml"
#REMOVEME? ynh_secure_remove --file="$install_dir"
# 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="$install_dir" --keep="config/secrets.yml config/database.yml" ynh_setup_source --dest_dir="$install_dir" --keep="config/secrets.yml config/database.yml"
cp -f "$tmpdir/secrets.yml" "$install_dir/config/secrets.yml"
cp -f "$tmpdir/database.yml" "$install_dir/config/database.yml"
ynh_secure_remove --file="$tmpdir"
fi fi
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"