Created
May 27, 2010 22:13
-
-
Save tjlytle/416430 to your computer and use it in GitHub Desktop.
Drop.io Shell Script
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 | |
#I am not a bash scripter, this is my feeble attempt to create | |
#a drop.io cli uploader by cobbling together various ideas found | |
#on the internet. Perhaps someone will see this and say, "Silly | |
#bash script n00b, I'll show you how it's done." | |
# | |
#That's fine by me. | |
drop() | |
{ | |
FILE=$1 | |
DROPNAME=$2 | |
curl -F version=1.0 -F api_key=$APIKEY -F drop_name=$DROPNAME -F "file=@$FILE" http://assets.drop.io/upload | |
} | |
APIKEY="XXXXXXXXXXXXX" | |
arg2=$1 | |
shift | |
while [[ "$1" != "" ]] ; do | |
drop $1 $arg2 | |
shift | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry, wasn't my intention to get around the downtime - I didn't realize that was possible, and have no idea if this would accomplish that. I simply couldn't use this because of the downtime, and figured I'd take the break to share it. The "somehow managed to get working" was in reference to my bash script abilities, not that I was using drop.io during the downtime (http://twitter.com/tjlytle/status/14862684433).