mirror of
https://github.com/YunoHost-Apps/invidious_ynh.git
synced 2024-09-03 19:15:55 +02:00
Update upgrade
This commit is contained in:
parent
e0caca3b92
commit
ac2a8b2af1
1 changed files with 1 additions and 14 deletions
|
@ -94,25 +94,12 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
|||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=5
|
||||
|
||||
tmpdir="$(mktemp -d)"
|
||||
ynh_secure_remove --file="$final_path" --keep="$final_path/config/config.yml"
|
||||
|
||||
# Backup the config file in the temp dir
|
||||
cp -a "$final_path/config/config.yml" "$tmpdir/config.yml"
|
||||
|
||||
# Remove the app directory securely
|
||||
ynh_secure_remove --file=$final_path
|
||||
|
||||
git clone https://github.com/iv-org/invidious "$final_path" --quiet
|
||||
pushd "$final_path" || ynh_die
|
||||
shards update && shards install
|
||||
crystal build $final_path/src/invidious.cr --release
|
||||
popd || ynh_die
|
||||
|
||||
# Copy the admin saved settings from tmp directory to final path
|
||||
cp -a "$tmpdir/config.yml" "$final_path/config/config.yml"
|
||||
|
||||
# Remove the tmp directory securely
|
||||
ynh_secure_remove --file="$tmpdir"
|
||||
fi
|
||||
|
||||
chmod 750 "$final_path"
|
||||
|
|
Loading…
Add table
Reference in a new issue