1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/hubzilla_ynh.git synced 2024-09-03 19:26:21 +02:00

Check version fix in upgrade script

This commit is contained in:
anmol 2020-11-13 05:44:46 +05:30
parent 3cf4b88391
commit c267cb589e
2 changed files with 7 additions and 4 deletions

View file

@ -1,7 +1,8 @@
# Hubzilla for YunoHost
[![Integration level](https://dash.yunohost.org/integration/hubzilla.svg)](https://dash.yunohost.org/appci/app/hubzilla) ![](https://ci-apps.yunohost.org/ci/badges/hubzilla.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/hubzilla.maintain.svg)
[![Install Nextcloud with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=hubzilla)
[![Install Hubzilla with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=hubzilla)
> *This package allow you to install Hubzilla quickly and simply on a YunoHost server.
If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*

View file

@ -160,17 +160,19 @@ if [ $database -eq 1 ]; then
# Check version and if this version was a fresh install push mysq query
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
if [ -z "$last_update" ] && [ "$version" == "3.8.4" ]; then
is_version_equal_three_eight_four=$(awk 'BEGIN{ print "'$version'"<"'3.8.4'" }')
if [ -z "$last_update" ] && [ "$is_version_equal_three_eight_four" -eq 1 ]; then
ynh_mysql_connect_as "$db_name" "$db_pwd" "$db_name" < "../conf/sql/385.sql"
fi
elif [ $database -eq 2 ]; then
ynh_install_app_dependencies $pkg_dependencies
fi
is_version_less_then_five=$(awk 'BEGIN{ print "'$version'"<"'5.0.0'" }')
if [ -z "$last_update" ] && [ $version -lt 5.0.0 ] && [ $version -nt 5.0.0 ] && [ -f "$final_path/util/z6convert.php" ] ; then
if [ "$is_version_less_then_five" -eq 1 ] && [ -f "$final_path/util/z6convert.php" ] ; then
pushd "$final_path"
php${YNH_PHP_VERSION} util/z6convert.php
php${YNH_PHP_VERSION} util/z6convert.php
popd
fi