aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/shareit-scrot
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/shareit-scrot')
-rwxr-xr-xscripts/shareit-scrot14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/shareit-scrot b/scripts/shareit-scrot
new file mode 100755
index 0000000..9588de6
--- /dev/null
+++ b/scripts/shareit-scrot
@@ -0,0 +1,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