2019-06-30 23:27:32 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# https://stackoverflow.com/questions/48133080/how-to-download-a-google-drive-url-via-curl-or-wget/48133859
|
|
|
|
|
2019-07-10 15:34:19 +00:00
|
|
|
# Zip coco folder
|
|
|
|
# zip -r coco.zip coco
|
|
|
|
# tar -czvf coco.tar.gz coco
|
|
|
|
|
2019-07-10 10:00:06 +00:00
|
|
|
# Set fileid and filename
|
|
|
|
filename="coco.zip"
|
2019-11-23 00:36:49 +00:00
|
|
|
fileid="1WQT6SOktSe8Uw6r10-2JhbEhMY5DJaph" # coco.zip
|
2019-07-10 10:00:06 +00:00
|
|
|
|
|
|
|
# Download from Google Drive, accepting presented query
|
2019-06-30 23:27:32 +00:00
|
|
|
curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}" > /dev/null
|
|
|
|
curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./cookie`&id=${fileid}" -o ${filename}
|
2019-07-10 10:00:06 +00:00
|
|
|
rm ./cookie
|
2019-06-30 23:27:32 +00:00
|
|
|
|
|
|
|
# Unzip
|
2019-07-10 15:33:24 +00:00
|
|
|
unzip -q ${filename} # for coco.zip
|
|
|
|
# tar -xzf ${filename} # for coco.tar.gz
|