From 2bd02042a38ec1076c3d1ef185c0be4fb4b1d382 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oriol=20Tint=C3=B3?= <oriol.tinto@lmu.de> Date: Fri, 19 May 2023 13:13:18 +0200 Subject: [PATCH] Adapt transfer.sh in case we run in the local machine. --- templates/common/transfer.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/templates/common/transfer.sh b/templates/common/transfer.sh index abf8097..d5dff4d 100644 --- a/templates/common/transfer.sh +++ b/templates/common/transfer.sh @@ -17,7 +17,13 @@ DESTINATION_DIR=${MAIN_LOCAL_FOLDER}/${STARTDATE}/${MEMBER} mkdir -p ${DESTINATION_DIR} -# Copy the output files -for file_name in ${OUTPUT_FILES}; do - rsync -v ${HPCUSER}@${HPCHOST}:${OUTPUT_DIR}/${file_name} ${DESTINATION_DIR} -done +if [[ "x$HPCHOST" == "xlocalhost" ]]; then + for file_name in ${OUTPUT_FILES}; do + rsync -v ${OUTPUT_DIR}/${file_name} ${DESTINATION_DIR} + done +else + # Copy the output files + for file_name in ${OUTPUT_FILES}; do + rsync -v ${HPCUSER}@${HPCHOST}:${OUTPUT_DIR}/${file_name} ${DESTINATION_DIR} + done +fi -- GitLab