1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/shaarli_ynh.git synced 2024-09-03 20:26:10 +02:00

fix copy in upgrade

This commit is contained in:
anmol26s 2018-06-25 10:15:58 +05:30
parent 6810532453
commit 81e25232eb

View file

@ -65,8 +65,9 @@ path_url=$(ynh_normalize_url_path $path_url)
# Create a temporary directory
tmpdir="$(mktemp -d)"
mkdir "$tmpdir/data"
# Backup the config file in the temp dir
cp -a "$final_path/data/" "$tmpdir/data/"
cp -a "$final_path/data/*" "$tmpdir/data/*"
# Remove the app directory securely
ynh_secure_remove "$final_path"
@ -77,7 +78,7 @@ ynh_secure_remove "$final_path"
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source "$final_path"
sudo cp -a "$tmpdir/data/" "${final_path}/data/"
sudo cp -a "$tmpdir/data/*" "${final_path}/data/*"
sudo rm -Rf "$tmpdir"
#=================================================