Skip to content

Commit

Permalink
Update install_data.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
rhshah committed Jun 18, 2024
1 parent 8c3259b commit 6be6e09
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions install_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,24 @@
# Test data is hosted on Google Drive at:
# https://drive.google.com/u/0/uc?id=1i1GA4AZhuw6Si8RmPFPJxmejIUt3ZZ1D

fileid=1i1GA4AZhuw6Si8RmPFPJxmejIUt3ZZ1D

filename=test_nucleo_qc.tar.gz
# Note: Drive seems to change somewhat frequently how it handles endpoints for large files
# add confirm parameter to link for this to work
# previously used another wget scheme and gdown
wget -O $filename "https://drive.google.com/u/0/uc?id=1i1GA4AZhuw6Si8RmPFPJxmejIUt3ZZ1D&export=download&confirm=t"
foldername=test_nucleo_qc

# Skip if already have test data
[[ -f $filename ]] && exit 0
[[ -d $foldername ]] && exit 0

curl -c ./cookie -s -k -L "https://drive.google.com/uc?export=download&id=$fileid" > /dev/null

curl -k -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./cookie`&id=${fileid}" -o ${filename}

# Suppress linux warnings for MacOS tar.gz files
if [[ "$OSTYPE" == "linux-gnu" ]]; then
tar --warning=no-unknown-keyword -xzvf $filename -C tests/inputs/
tar --warning=no-unknown-keyword -xzvf $filename
elif [[ "$OSTYPE" == "darwin"* ]]; then
tar -xzvf $filename -C tests/inputs/
tar -xzvf $filename
fi

rm $filename

0 comments on commit 6be6e09

Please sign in to comment.