Created
May 6, 2020 14:13
-
-
Save neerajvashistha/806d01c1b77798217fb97bd8a0176336 to your computer and use it in GitHub Desktop.
Google Drive upload facility
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 characters
#!/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