Advertisement
PRIMETOXINZ

Untitled

Aug 19th, 2015
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. #!/bin/bash
  2. url=""
  3. if [[ $1 == ?(-)+([0-9]) ]]; then
  4. echo "taking photo in $1"
  5. if [ -z "$2" ];
  6. then
  7. url='%Y-%m-%d_$wx$h_scrot.png'
  8. scrot -u -d $1 '%Y-%m-%d_$wx$h_scrot.png' -e 'mv $f /srv/http/img/'
  9. else
  10. echo "$2"
  11. url="$2"
  12. scrot -u -d $1 "$2" -e 'mv $f /srv/http/img/'
  13. fi
  14.  
  15. else
  16.  
  17. clear="clear"
  18.  
  19. if [ -z "$1" ];
  20. then
  21. echo "please select an area"
  22. url='%Y-%m-%d_$wx$h_scrot.png'
  23. scrot -s '%Y-%m-%d_$wx$h_scrot.png' -e 'mv $f /srv/http/img/'
  24. else
  25. if [ "$1" = "$clear" ];
  26. then
  27.  
  28. rm /srv/http/img/*
  29. else
  30. echo "please select an area"
  31. echo "$1"
  32. url="$1"
  33. scrot -s "$1" -e 'mv $f /srv/http/img/'
  34. fi
  35.  
  36. fi
  37. fi
  38. echo "http://68.107.226.229:8182/img/"$url | xclip -selection clipboard
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement