Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- EMAIL=
- APIKEY=
- ENDPOINT=http://puush.me
- count=1
- if [ $# -eq 1 ]; then
- link=`curl -s -F "z=poni" -F "e=$EMAIL" -F "k=$APIKEY" -F "f=@$1" $ENDPOINT/api/up/ | cut -d',' -f 2`
- while [ -z "$link" ]
- do
- echo -e "Error. \nTry: $count. \nPress CTRL + C to stop trying."
- link=`curl -s -F "z=poni" -F "e=$EMAIL" -F "k=$APIKEY" -F "f=@$1" $ENDPOINT/api/up/ | cut -d',' -f 2`
- (( count+=1 ))
- done
- echo $link
- else
- echo "Usage: puu.sh <file>"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement