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:
parent
55826d9bc2
commit
838574f3ea
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue