Advertisement
tonybaldwin

friendicurl

Jun 29th, 2011
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.33 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # updated friendika
  4.  
  5. read -p "enter your password:  " pwrd
  6.  
  7. if [[ $(echo $*) ]]; then
  8.     ud="$*"
  9. else
  10.     read -p "Enter your update text: " ud
  11. fi
  12.  
  13. if [[ $(curl -u tonybaldwin:$pwrd -d status="$ud" http://friendika.openmindspace.org/api/statuses/update.xml | grep error) ]]; then
  14.     echo "Error"
  15. else
  16.     echo "Success!"
  17.     echo $ud
  18. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement