Skip to content

Instantly share code, notes, and snippets.

@neerajvashistha
Created May 6, 2020 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neerajvashistha/806d01c1b77798217fb97bd8a0176336 to your computer and use it in GitHub Desktop.
Save neerajvashistha/806d01c1b77798217fb97bd8a0176336 to your computer and use it in GitHub Desktop.
Google Drive upload facility
#!/bin/bash
# https://github.com/mbrother2/butgg
# curl -o butgg.bash https://raw.githubusercontent.com/mbrother2/butgg/master/butgg.bash
# bash butgg.bash --setup
# Google API client_id: 10xxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com
# Google API client_secret: rxxxxxxxxxxxxxxxxxxxxxxxxl
DatasetsID='1CIsxxxxxxxxxxxxxxxxeswHISm'
DocumentsID='1pA2kxxxxxxxxxxxxxxxxxesjYfXzv7YK'
ModelsID='1E7nJkmxxxxxxxxxxxxxxxxxxxxxxxSo8F3vsqc-'
if [[ "$1" == "Datasets" ]]
then
echo "Uploading to Cheqout Datasets"
echo "File: "$2
/home/xxxxxxx/.xxxxxxxx/gupload/bin/gdrive upload -p $DatasetsID $2
elif [[ "$1" == "Documents" ]]
then
echo "Uploading to Cheqout Documents"
echo "File: "$2
/home/xxxxxxx/.xxxxxxxx/gupload/bin/gdrive upload -p $DocumentsID $2
elif [[ "$1" == "Models" ]]
then
echo "Uploading to Cheqout Models"
echo "File: "$2
/home/xxxxxxx/.xxxxxxxx/gupload/bin/gdrive upload -p $ModelsID $2
else
echo "Check arguments"
echo "gupload [Datasets|Documents|Models] filepath"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment