Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- PUUSH_API_KEY="API KLEY HERE"
- function puush {
- echo $1
- if [ -z "$PUUSH_API_KEY" ]
- then
- echo "Set the variable PUUSH_API_KEY in $0 or with 'export PUUSH_API_KEY=\"apiKeyHere\""
- exit
- elif ! [ -r "$1" ]
- then
- echo "Specify a file to be uploaded"
- exit
- fi
- POOP=$(curl "https://puush.me/api/up" -# -F "k=$PUUSH_API_KEY" -F "z=poop" -F "f=@$1" | sed -E 's/^.+,(.+),.+,.+$/\1\n/')
- }
- if [ $1 == "region" ]
- then
- # notify-send "Capturing region"
- import temp.png
- else
- # notify-send "Capturing everything"
- import -window root temp.png
- fi
- notify-send "Uploading..."
- puush temp.png
- PO="Upload Complete: $POOP"
- notify-send "$PO"
- rm temp.png
- echo $POOP | xclip -selection c
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement