mirror of
https://github.com/YunoHost-Apps/minetest_ynh.git
synced 2024-09-03 20:36:00 +02:00
Add version check in upgrade
This commit is contained in:
parent
f6333383c0
commit
7479885c96
1 changed files with 23 additions and 0 deletions
|
@ -30,6 +30,15 @@ servername=$(ynh_app_setting_get --app=$app --key=servername)
|
||||||
#=================================================
|
#=================================================
|
||||||
# ENSURE DOWNWARD COMPATIBILITY
|
# ENSURE DOWNWARD COMPATIBILITY
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_print_info --message="Checking version..."
|
||||||
|
version=ynh_app_upstream_version
|
||||||
|
|
||||||
|
if [ "$version" = "0.01" ]; then
|
||||||
|
then
|
||||||
|
ynh_die --message="You can't upgrade to this version with simple upgrade. Please read the readme for upgrading https://github.com/YunoHost-Apps/minetest_ynh#additional-information ..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
ynh_print_info --message="Ensuring downward compatibility..."
|
ynh_print_info --message="Ensuring downward compatibility..."
|
||||||
|
|
||||||
# Fix is_public as a boolean value
|
# Fix is_public as a boolean value
|
||||||
|
@ -97,6 +106,20 @@ ynh_print_info --message="Upgrading systemd configuration..."
|
||||||
# Create a dedicated systemd config
|
# Create a dedicated systemd config
|
||||||
ynh_add_systemd_config
|
ynh_add_systemd_config
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# COPY CONFIG FILE
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
if [ -e /home/yunohost.app/$app ]
|
||||||
|
then
|
||||||
|
echo "Nothing to do..."
|
||||||
|
else
|
||||||
|
mkdir -p /home/yunohost.app/$app/.minetest/
|
||||||
|
mkdir /home/yunohost.app/$app/.minetest/worlds/
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp -a ../conf/minetest.conf /home/yunohost.app/$app/.minetest/
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC UPGRADE
|
# SPECIFIC UPGRADE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue