Another copy of my dotfiles. Because I don't completely trust GitHub.
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.

15 lines
261 B

  1. #!/bin/bash
  2. location="$1"
  3. mkdir -p "$(echo "$location" | sed 's|/[^/]*$||g')"
  4. xclip -selection clipboard -t image/png -o 2> /dev/null > $location
  5. if [ ! "$?" = "0" ]; then
  6. printf "An error occured"
  7. rm -f "$location"
  8. exit 1
  9. fi
  10. printf "%s" "$location"