From 59c5d4a0dbd794e1cdc0ddc84ce9bd1f6cb7224e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20Bourr=C3=A9?= Date: Tue, 25 Dec 2018 19:32:44 +0100 Subject: [PATCH] fix restore --- scripts/restore | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/restore b/scripts/restore index 01c8b26..d3d882c 100644 --- a/scripts/restore +++ b/scripts/restore @@ -6,12 +6,19 @@ # IMPORT GENERIC HELPERS #================================================= +if [ ! -e _common.sh ]; then + # Get the _common.sh file if it's not in the current directory + cp ../settings/scripts/_common.sh ./_common.sh + mkdir ./upgrade.d + cp ../settings/upgrade.d/upgrade.sh ./upgrade.d/upgrade.sh + chmod a+rx _common.sh upgrade.d/upgrade.sh +fi + # Source YunoHost helpers source /usr/share/yunohost/helpers # Load common variables and helpers -source ../settings/scripts/_common.sh -source ../settings/scripts/upgrade.d/upgrade.sh +source _common.sh #================================================= # MANAGE SCRIPT FAILURE