aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/shareit-scrot
blob: 9588de6cb85a02492e3970afba1dd9620da4d667 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash
set -e

file=

cleanup_cb() { [ -n "$file" ] && rm $file; }

trap cleanup_cb EXIT

file=$(mktemp --suffix=.png)

scrot -s $file

shareit $file