Created
December 16, 2020 22:34
-
-
Save davzaman/25b1488c8d1255f23fb4db4f20d0dfc4 to your computer and use it in GitHub Desktop.
Revisions
-
davzaman created this gist
Dec 16, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ #!/bin/bash # Reference: https://stackoverflow.com/a/48133859/1888794 # fileid is the part of the link to the artifact: https://drive.google.com/file/d/<FILEID>/view? FILEID=$1 FILENAME=$2 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} rm cookie