Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # script to take screenshots
- # requires imagemagick (import)
- # assumes web server set up to server public_html
- name=`date +%d-%m-%y-%H-%M-%S`
- USE_HOSTING=true
- PUBLIC_HOST=public.host.org
- SSH_HOST=ssh.host.org
- SSH_USER=ssh_user
- DROPBOX_UID=my_dropbox_uid
- # pause to be able to open menu or combobox if we want to shot it
- sleep 1
- import -silent /tmp/$name.png
- file=$name.png
- if [ $USE_HOSTING = "true" ]; then
- text="http://${PUBLIC_HOST}/screen/${file}"
- scp -P 2222 /tmp/${file} ${SSH_USER}@${SSH_HOST}:/home/${SSH_USER}/public_html/screen
- else
- text="https://dl.dropbox.com/u/${DROPBOX_UID}/${file}"
- cp /tmp/${file} ~/Dropbox/Public
- fi
- echo $text | xclip
- rm -f /tmp/$file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement