aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/shareit-scrot
diff options
context:
space:
mode:
authorVG <vg@devys.org>2015-01-28 18:45:29 +0100
committerVG <vg@devys.org>2015-01-28 18:45:29 +0100
commit12240fb74c0c6f2768e1070f849cd265ea3dd181 (patch)
tree6f5cb93e0e020bd918e015aba164e90db1fd0739 /scripts/shareit-scrot
downloadshareit-12240fb74c0c6f2768e1070f849cd265ea3dd181.tar.gz
shareit-12240fb74c0c6f2768e1070f849cd265ea3dd181.tar.bz2
shareit-12240fb74c0c6f2768e1070f849cd265ea3dd181.zip
First commit
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