From d81fae644b5bcd008058be4af200e14948b570cb Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Mon, 18 Mar 2013 14:07:52 -0400 Subject: [PATCH] Skip creation of processed directory when it will not be used. --- harvest/batch-import-marc-auth.bat | 1 + harvest/batch-import-marc-auth.sh | 7 +++++-- harvest/batch-import-marc.bat | 1 + harvest/batch-import-marc.sh | 7 +++++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/harvest/batch-import-marc-auth.bat b/harvest/batch-import-marc-auth.bat index 6686185d6b7..0fb5af34082 100644 --- a/harvest/batch-import-marc-auth.bat +++ b/harvest/batch-import-marc-auth.bat @@ -97,6 +97,7 @@ if "%LOGGING%"=="0" goto logfound md %BASEPATH%\log :logfound if exist %BASEPATH%\processed goto processedfound +if "%MOVE_DATA%"=="0" goto processedfound md %BASEPATH%\processed :processedfound diff --git a/harvest/batch-import-marc-auth.sh b/harvest/batch-import-marc-auth.sh index ab2d392b862..248e4a01134 100755 --- a/harvest/batch-import-marc-auth.sh +++ b/harvest/batch-import-marc-auth.sh @@ -84,9 +84,12 @@ then mkdir $BASEPATH/log fi fi -if [ ! -d $BASEPATH/processed ] +if [ $MOVE_DATA == true ] then - mkdir $BASEPATH/processed + if [ ! -d $BASEPATH/processed ] + then + mkdir $BASEPATH/processed + fi fi # The log() function can be redefined to suit a variety of logging needs diff --git a/harvest/batch-import-marc.bat b/harvest/batch-import-marc.bat index 957eab5cbfe..35fb02546ba 100644 --- a/harvest/batch-import-marc.bat +++ b/harvest/batch-import-marc.bat @@ -97,6 +97,7 @@ if "%LOGGING%"=="0" goto logfound md %BASEPATH%\log :logfound if exist %BASEPATH%\processed goto processedfound +if "%MOVE_DATA%"=="0" goto processedfound md %BASEPATH%\processed :processedfound diff --git a/harvest/batch-import-marc.sh b/harvest/batch-import-marc.sh index ceb53df46ba..8bbe2019258 100755 --- a/harvest/batch-import-marc.sh +++ b/harvest/batch-import-marc.sh @@ -84,9 +84,12 @@ then mkdir $BASEPATH/log fi fi -if [ ! -d $BASEPATH/processed ] +if [ $MOVE_DATA == true ] then - mkdir $BASEPATH/processed + if [ ! -d $BASEPATH/processed ] + then + mkdir $BASEPATH/processed + fi fi # The log() function can be redefined to suit a variety of logging needs -- GitLab