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

[enh] Avoid to rebuild borg at every upgrade

This commit is contained in:
ljf 2021-11-30 19:04:08 +01:00
parent 88c040b101
commit 7aa383d41c

View file

@ -12,7 +12,7 @@ pkg_dependencies="python3-pip python3-dev libacl1-dev libssl-dev liblz4-dev pyth
# Install borg with pip if borg is not here # Install borg with pip if borg is not here
install_borg_with_pip () { install_borg_with_pip () {
if [ -d /opt/borg-env ]; then if [ -d /opt/borg-env ]; then
/opt/borg-env/bin/python /opt/borg-env/bin/pip list | grep "Version: $BORG_VERSION" || ynh_secure_remove /opt/borg-env /opt/borg-env/bin/python /opt/borg-env/bin/pip list | grep "borgbackup *$BORG_VERSION" || ynh_secure_remove /opt/borg-env
fi fi
if [ ! -d /opt/borg-env ]; then if [ ! -d /opt/borg-env ]; then
python3 -m venv /opt/borg-env python3 -m venv /opt/borg-env