Advertisement
Guest User

Untitled

a guest
Nov 18th, 2011
610
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.71 KB | None | 0 0
  1. #!/bin/sh
  2. # script to take screenshots
  3. # requires imagemagick (import)
  4. # assumes web server set up to server public_html
  5.  
  6. name=`date +%d-%m-%y-%H-%M-%S`
  7.  
  8. USE_HOSTING=true
  9. PUBLIC_HOST=public.host.org
  10. SSH_HOST=ssh.host.org
  11. SSH_USER=ssh_user
  12. DROPBOX_UID=my_dropbox_uid
  13.  
  14. # pause to be able to open menu or combobox if we want to shot it
  15. sleep 1
  16.  
  17. import -silent /tmp/$name.png
  18. file=$name.png
  19.  
  20. if [ $USE_HOSTING = "true" ]; then
  21.     text="http://${PUBLIC_HOST}/screen/${file}"
  22.     scp -P 2222 /tmp/${file} ${SSH_USER}@${SSH_HOST}:/home/${SSH_USER}/public_html/screen
  23. else
  24.     text="https://dl.dropbox.com/u/${DROPBOX_UID}/${file}"
  25.     cp /tmp/${file} ~/Dropbox/Public
  26. fi
  27.  
  28. echo $text | xclip
  29. rm -f /tmp/$file
  30.  
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement