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:
parent
3cf4b88391
commit
c267cb589e
2 changed files with 7 additions and 4 deletions
|
@ -1,7 +1,8 @@
|
||||||
# Hubzilla for YunoHost
|
# Hubzilla for YunoHost
|
||||||
|
|
||||||
[](https://dash.yunohost.org/appci/app/hubzilla)  
|
[](https://dash.yunohost.org/appci/app/hubzilla)  
|
||||||
[](https://install-app.yunohost.org/?app=hubzilla)
|
|
||||||
|
[](https://install-app.yunohost.org/?app=hubzilla)
|
||||||
|
|
||||||
> *This package allow you to install Hubzilla quickly and simply on a YunoHost server.
|
> *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.*
|
If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*
|
||||||
|
|
|
@ -160,17 +160,19 @@ if [ $database -eq 1 ]; then
|
||||||
# Check version and if this version was a fresh install push mysq query
|
# 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_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
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"
|
ynh_mysql_connect_as "$db_name" "$db_pwd" "$db_name" < "../conf/sql/385.sql"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
elif [ $database -eq 2 ]; then
|
elif [ $database -eq 2 ]; then
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
fi
|
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"
|
pushd "$final_path"
|
||||||
php${YNH_PHP_VERSION} util/z6convert.php
|
php${YNH_PHP_VERSION} util/z6convert.php
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue