From 1cbf55f8d943fc01d9bc4d05713dd7473f464816 Mon Sep 17 00:00:00 2001
From: James Nairn <jwrn3@cam.ac.uk>
Date: Tue, 6 Oct 2020 14:44:11 +0100
Subject: [PATCH] Fixed issue with defining $CURATEDPAPERLISTFILE

The path to the file was not included so the check for exisitance/content was failing
---
 weekly_routine.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/weekly_routine.sh b/weekly_routine.sh
index a142f74..cccacc6 100755
--- a/weekly_routine.sh
+++ b/weekly_routine.sh
@@ -157,9 +157,9 @@ fi
 # if there are no new papers to add in a particular week, the output file,
 # fbrf_input_list.tsv, will be empty
 
-CURATEDPAPERLISTFILE="fbrf_input_list.tsv"
+CURATEDPAPERLISTFILE="/root/fbrf_input_list.tsv"
 log "Creating ${CURATEDPAPERLISTFILE}"
-/usr/bin/perl /data/export/support_scripts/get_fbrfs_to_add_to_canto.pl /data/export/support_scripts/modules_server.cfg > "/root/${CURATEDPAPERLISTFILE}"
+/usr/bin/perl /data/export/support_scripts/get_fbrfs_to_add_to_canto.pl /data/export/support_scripts/modules_server.cfg > "${CURATEDPAPERLISTFILE}"
 
 JSONIMPORTFILE="/import_export/import-fbrfs.json"
 
@@ -177,7 +177,7 @@ if [[ ( -e "${CURATEDPAPERLISTFILE}" ) && ( -s "${CURATEDPAPERLISTFILE}" ) ]]; t
 	./canto/script/canto_docker ./script/canto_add.pl --sessions-from-json "${JSONIMPORTFILE}" "vmt25@cam.ac.uk" 7227
 
 	# remove the fbrf_input_list.tsv file once done, so that the script doesn't try to add the same information again next time its run
-	/bin/rm "/root/${CURATEDPAPERLISTFILE}"
+	#/bin/rm "${CURATEDPAPERLISTFILE}"
 else
 	log "Not loading ${JSONIMPORTFILE} into Canto. Either ${CURATEDPAPERLISTFILE} does not exist or is empty..."
 fi
-- 
GitLab