1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/borg_ynh.git synced 2024-09-03 18:16:05 +02:00

Define BORG_VERSION inside of function to make use of helper

This commit is contained in:
Salamandar 2024-05-03 10:40:11 +02:00
parent 55826d9bc2
commit 838574f3ea

View file

@ -4,14 +4,14 @@
# COMMON VARIABLES
#=================================================
BORG_VERSION=$(cat $YNH_APP_BASEDIR/manifest.toml | grep "^version" | grep -oE "[0-9.]{2,}")
#=================================================
# PERSONAL HELPERS
#=================================================
# Install borg with pip if borg is not here
install_borg_with_pip () {
BORG_VERSION=$(ynh_app_upstream_version)
if [ -d /opt/borg-env ]; then
/opt/borg-env/bin/python /opt/borg-env/bin/pip list | grep "borgbackup *$BORG_VERSION" || ynh_secure_remove /opt/borg-env
fi