Simple image host.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mclip 246B

12345678910111213141516171819
  1. #!/bin/bash
  2. OS=$(uname)
  3. if [ "$1" = "paste" ]; then
  4. if [ "$OS" = "Darwin" ]; then
  5. pbpaste
  6. else
  7. xsel -ob
  8. fi
  9. else
  10. content=$(cat -)
  11. if [ "$OS" = "Darwin" ]; then
  12. echo -n "$content" | pbcopy
  13. else
  14. echo -n "$content" | xsel -ib
  15. fi
  16. fi