Skip to content

Commit

Permalink
Merge pull request #2137 from RTXteam/master
Browse files Browse the repository at this point in the history
Bringing branch `issue-2114` up-to-date with most recent commits in `master`
  • Loading branch information
saramsey authored Sep 16, 2023
2 parents c7f73be + c049b98 commit 4c002c7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
16 changes: 15 additions & 1 deletion deploy/arax/scripts/download_database.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ echo "
################################################################################
# #
# #
# ARAX Database Download Utility #
# KG2 Database Download Utility #
# #
# #
################################################################################"
Expand Down Expand Up @@ -124,6 +124,20 @@ do
printf 'Downloading from "%s" to "%s"...\n' "$file2download" "$file2download_localpath"
sftp -i $sftp_key -o StrictHostKeyChecking=no -p $file2download $file2download_localpath
printf '\n'

# comparing the downloaded file with the original file and retry if there are not the same
#file1="$sftp_url${temp/.md5/}"
#file2="${file2download/$sftp_url/}"
if cmp -s "$file2download" "$file2download_localpath"; then
printf 'The file "%s" is the same as "%s"\n' "$file1" "$file2"
else
printf 'The file "%s" is different from "%s"\n' "$file1" "$file2"
printf 'The 1st download failed'
printf 'The 2nd try, downloading from "%s" to "%s"...\n' "$file2download" "$file2download_localpath"
sftp -i $sftp_key -o StrictHostKeyChecking=no -p $file2download $file2download_localpath
printf '\n'
fi

fi
done

Expand Down
2 changes: 1 addition & 1 deletion deploy/kg2/scripts/download_database.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@ done
# rename new MD5 to local
printf 'renaming "%s" to "%s"...\n' $md5_sums_new $md5_sums_local
rm -rf $md5_sums_local
mv $md5_sums_new $md5_sums_local
mv $md5_sums_new $md5_sums_local
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ pronto==2.5.3
pygit2==1.10.0
tabulate==0.9.0
urllib3==1.26.16
sqlitedict

0 comments on commit 4c002c7

Please sign in to comment.