mirror of
https://github.com/YunoHost-Apps/borgserver_ynh.git
synced 2024-09-03 20:36:20 +02:00
[fix] Missing helper
This commit is contained in:
parent
eb42ff9091
commit
b79bfafd67
1 changed files with 11 additions and 0 deletions
|
@ -59,6 +59,17 @@ ynh_configure () {
|
||||||
ynh_store_file_checksum $2
|
ynh_store_file_checksum $2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ynh_read_json () {
|
||||||
|
sudo python3 -c "import sys, json;print(json.load(open('$1'))['$2'])"
|
||||||
|
}
|
||||||
|
|
||||||
|
ynh_read_manifest () {
|
||||||
|
if [ -f '../manifest.json' ] ; then
|
||||||
|
ynh_read_json '../manifest.json' "$1"
|
||||||
|
else
|
||||||
|
ynh_read_json '../settings/manifest.json' "$1"
|
||||||
|
fi
|
||||||
|
}
|
||||||
# Checks the app version to upgrade with the existing app version and returns:
|
# Checks the app version to upgrade with the existing app version and returns:
|
||||||
# - UPGRADE_APP if the upstream app version has changed
|
# - UPGRADE_APP if the upstream app version has changed
|
||||||
# - UPGRADE_PACKAGE if only the YunoHost package has changed
|
# - UPGRADE_PACKAGE if only the YunoHost package has changed
|
||||||
|
|
Loading…
Add table
Reference in a new issue