FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit f5a36aac authored by Vitor Trovisco's avatar Vitor Trovisco
Browse files

Update weekly_routine.sh

1. replacing log references to "${JSONIMPORTFILE}" with "/import_export/import-fbrfs.json", so that the filename is explicit rather than a "." when the file is empty.

2. remove 'CURATEDPAPERLISTFILE' (./fbrf_input_list.tsv) and 'JSONIMPORTFILE' (/import_export/import-fbrfs.json) while archiving, so that the files cannot be re-used in a following epicycle.
parent 62b6577c
No related branches found
No related tags found
No related merge requests found
......@@ -284,12 +284,9 @@ if [[ ( -e "${CURATEDPAPERLISTFILE}" ) && ( -s "${CURATEDPAPERLISTFILE}" ) ]]; t
# JWRN comment: again I suspect the sudo is superfluous so removed
log "Importing ${JSONIMPORTFILE} into Canto"
./canto/script/canto_docker ./script/canto_add.pl --sessions-from-json "${JSONIMPORTFILE}" "ignore@flybase.org" 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 "${CURATEDPAPERLISTFILE}"
else
log "Not loading ${JSONIMPORTFILE} into Canto. Either ${CURATEDPAPERLISTFILE} does not exist or is empty..."
log "Not loading ./import_export/import-fbrfs.json into Canto. Either ./fbrf_input_list.tsv does not exist or is empty..."
fi
if [[ -e "${CURATEDPAPERLISTFILE}" ]]; then
......@@ -298,10 +295,11 @@ if [[ -e "${CURATEDPAPERLISTFILE}" ]]; then
FBRFARCHIVE="fbrf_input_list_$(date +"%Y-%m-%d")"
# Copy fbrf_input_list.tsv to archive
log "Copying ${CURATEDPAPERLISTFILE} to ${ARCHIVE}/${FBRFARCHIVE}"
log "Copying ./fbrf_input_list.tsv to ${ARCHIVE}/${FBRFARCHIVE}"
# Copy file to archive with correct name
# Archive file with correct name (and delete original)
cp "${CURATEDPAPERLISTFILE}" "${ARCHIVE}/${FBRFARCHIVE}"
rm "${CURATEDPAPERLISTFILE}"
fi
......@@ -314,11 +312,11 @@ if [[ -e ".${JSONIMPORTFILE}" ]]; then
JSONARCHIVE="import-fbrfs_json_$(date +"%Y-%m-%d")"
# Copy /import_export/import-fbrfs.json to archive
log "Copying .${JSONIMPORTFILE} to ${ARCHIVE}/${JSONARCHIVE}"
log "Copying /import_export/import-fbrfs.json to ${ARCHIVE}/${JSONARCHIVE}"
# Copy file to archive with correct name
# Archive file with correct name (and delete original)
cp ".${JSONIMPORTFILE}" "${ARCHIVE}/${JSONARCHIVE}"
rm ".${JSONIMPORTFILE}"
fi
# Restart Canto post processing
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment