"MaJ expl_transfert_dir.sh"

This commit is contained in:
Doug Le Tough 2017-07-22 14:04:47 +02:00
parent dead377930
commit 0f216c4b2d

View File

@ -120,7 +120,7 @@ function check_dirs
ssh ${dst_host} "sudo find ${ROOT_DST_DIR} -maxdepth 1 -type d -name ${BASE_DST_DIR} >/dev/null 2>&1" ssh ${dst_host} "sudo find ${ROOT_DST_DIR} -maxdepth 1 -type d -name ${BASE_DST_DIR} >/dev/null 2>&1"
RET_VAL=$? RET_VAL=$?
if [ ! ${RET_VAL} -eq 0 ]; then if [ ! ${RET_VAL} -eq 0 ]; then
ERROR="Le répertoire ${src_host}:${src_dir} n'existe pas" ERROR="Le répertoire ${dst_host}:${dst_dir} n'existe pas"
fct_erreur 2 fct_erreur 2
fi fi
if [ $(ssh ${dst_host} "sudo find ${ROOT_DST_DIR} -maxdepth 1 -type d -name ${BASE_DST_DIR} | wc -l") -eq 0 ]; then if [ $(ssh ${dst_host} "sudo find ${ROOT_DST_DIR} -maxdepth 1 -type d -name ${BASE_DST_DIR} | wc -l") -eq 0 ]; then