feat : bug telechargement
This commit is contained in:
@@ -101,6 +101,10 @@ require_cmd() {
|
|||||||
download_remote_file() {
|
download_remote_file() {
|
||||||
local remote_path="$1"
|
local remote_path="$1"
|
||||||
local local_path="$2"
|
local local_path="$2"
|
||||||
|
local local_dir
|
||||||
|
|
||||||
|
local_dir="$(dirname "$local_path")"
|
||||||
|
mkdir -p "$local_dir" || fail "impossible de créer le dossier local de restauration : $local_dir"
|
||||||
|
|
||||||
if scp "${SSH_OPTS[@]}" "${REMOTE_SSH}:${remote_path}" "$local_path" >>"$LOG_FILE" 2>&1; then
|
if scp "${SSH_OPTS[@]}" "${REMOTE_SSH}:${remote_path}" "$local_path" >>"$LOG_FILE" 2>&1; then
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
Reference in New Issue
Block a user