diff options
-rwxr-xr-x | sl | 22 | ||||
-rwxr-xr-x | ssl | 22 |
2 files changed, 28 insertions, 16 deletions
@@ -1,14 +1,20 @@ #!/usr/bin/env bash +## +# Create a screenshot using scrot, then dump it in ~/dumpdir for +# dumpwatch to upload it to the appropriate server. +# +# This script requires dumpwatch to already be running. +# + set -o errexit -id=$(mktemp /tmp/XXXXXXXXXX).png -host='theos.kyriasis.com' -url="https://$host/~kyrias/s/$(basename $id)" +if [[ -z "$TMPDIR" ]]; then + TMPDIR=/tmp +fi + +file=$(mktemp -u XXXXXXXXXX.png) -scrot "$id" -scp -q "$id" "$host":public_html/s/ -rm "$id" +scrot "$TMPDIR"/"$file" -printf "URL: %s\n" "$url" -printf "%s\n" "$url" | xclip -selection clipboard +mv "$TMPDIR"/"$file" "$HOME"/dumpdir/"$file" @@ -1,14 +1,20 @@ #!/usr/bin/env bash +## +# Create a screenshot using scrot, then dump it in ~/dumpdir for +# dumpwatch to upload it to the appropriate server. +# +# This script requires dumpwatch to already be running. +# + set -o errexit -id=$(mktemp /tmp/XXXXXXXXXX).png -host='theos.kyriasis.com' -url="https://$host/~kyrias/s/$(basename $id)" +if [[ -z "$TMPDIR" ]]; then + TMPDIR=/tmp +fi + +file=$(mktemp -u XXXXXXXXXX.png) -scrot -s "$id" -scp -q "$id" "$host":public_html/s/ -rm "$id" +scrot -s "$TMPDIR"/"$file" -printf "URL: %s\n" "$url" -printf "%s\n" "$url" | xclip -selection clipboard +mv "$TMPDIR"/"$file" "$HOME"/dumpdir/"$file" |