From 8638bb6732eca70c5b70decaf1d788b49ec29deb Mon Sep 17 00:00:00 2001 From: "Felix Z. Hoffmann" Date: Tue, 21 Apr 2020 11:58:08 +0200 Subject: [PATCH] automatic detection of analysis-dev/ presence implemented [#18] if analysis-dev is present, it is used as the analysis directory. otherwise the analysis folder out of the box gets used. --- run.sh | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/run.sh b/run.sh index 0816a06..d87fa98 100755 --- a/run.sh +++ b/run.sh @@ -52,12 +52,24 @@ TIMESTAMP=$(date +"%y%m%d_%H%M%S")$POSTFIX; mkdir -p ../running/$TIMESTAMP -#rsync -a --exclude='*~' --exclude='.git' \ -rsync -a --exclude='*~' --exclude='analysis/' \ - $CODEDIR/ ../running/$TIMESTAMP/src/ +if [[ -d ../analysis-dev/ ]] +then + echo "Note: analysis-dev/ directory found." + echo "Replacing analysis/ with analysis-dev/ in output folder." + + rsync -a --exclude='*~' --exclude='analysis/' \ + $CODEDIR/ ../tests/testing/$WDIR/src/ + + rsync -a --delete --exclude='*~' --exclude='__pycache__' \ + $CODEDIR/../analysis-dev/ ../tests/testing/$WDIR/src/analysis -rsync -a --delete --exclude='*~' --exclude='__pycache__' \ - $CODEDIR/../analysis-dev/ ../running/$TIMESTAMP/src/analysis +else + echo "Note: analysis-dev/ directory not found." + echo "Proceeding without replacment." + + rsync -a --exclude='*~' \ + $CODEDIR/ ../tests/testing/$WDIR/src/ +fi cd ../running/$TIMESTAMP