Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- PUUSH_API_KEY="YOUR API KEY HEX CODE"
- FILE="/tmp/puush.jpg"
- if [ -z "$PUUSH_API_KEY" ]; then
- echo "Set the variable PUUSH_API_KEY"
- exit 1
- elif [ -z "$1" ]; then
- echo "Specify a mode (-a or -s) or file"
- exit 2
- fi
- if [ -f $FILE ]; then
- rm $FILE
- fi
- case "$1" in
- -a)
- scrot $FILE
- ;;
- -s)
- scrot -s $FILE
- ;;
- *)
- FILE=$1
- ;;
- esac
- curl "https://puush.me/api/up" -# -F "k=$PUUSH_API_KEY" -F "z=poop" -F "f=@$FILE" | sed -E 's/^.+,(.+),.+,.+$/\1/' | xclip
- mpg123 ~/media/sonidos/robot_servo_arm.mp3 > /dev/null 2>&1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement