1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/weblate_ynh.git synced 2024-10-01 13:35:04 +02:00
weblate_ynh/hooks/post_app_upgrade
2018-10-15 22:30:49 +02:00

18 lines
No EOL
802 B
Bash

#!/bin/bash
migration311=$(yunohost app setting "$YNH_APP_INSTANCE_NAME" "migration311" --output-as plain --quiet)
mig_type=$(yunohost app setting "$YNH_APP_INSTANCE_NAME" "migration311_type" --output-as plain --quiet)
mig_parm=$(yunohost app setting "$YNH_APP_INSTANCE_NAME" "migration311_parm" --output-as plain --quiet)
if [[ "$migration311" = "two_steps_upgrade_3.0to3.1-needed" ]]
then
yunohost app setting "$YNH_APP_INSTANCE_NAME" "migration311" --value="two_steps_upgrade_3.0to3.1-progress" --quiet
if [ "$mig_type" = "file" ]
then
yunohost app upgrade "$YNH_APP_INSTANCE_NAME" --file "$mig_parm"
else
yunohost app upgrade "$YNH_APP_INSTANCE_NAME" --url "$mig_parm"
fi
yunohost app setting "$YNH_APP_INSTANCE_NAME" "migration311" --value="two_steps_upgrade_3.0to3.1-done" --quiet
fi