Skip to content

Commit

Permalink
Add check file
Browse files Browse the repository at this point in the history
  • Loading branch information
akawashiro committed Feb 6, 2024
1 parent 626dfd0 commit d6675a7
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions jendeley-backend/scripts/check_update_all_generated_DBs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#! /bin/bash
set -eux

rootdir=$(git rev-parse --show-toplevel)
workdir=$(mktemp -d -t jendeley_check_update_all_generated_DBs_XXXXX)
cd ${rootdir}/jendeley-backend

ok=0
for db in $(find ${rootdir}/jendeley-backend/generated_DBs -name "*.json" | sort); do
echo Checking $db
node --require source-map-support/register dist/index.js update_db --db1 ${db} --db2 ${workdir}/updated_$(basename $db)
if [[ ! -f ${workdir}/updated_$(basename $db) ]]; then
ok=1
fi
done
echo Check ${workdir} for updated DBs
exit $ok

0 comments on commit d6675a7

Please sign in to comment.