Use mktemp instead of date for safety
parent
bae2bbb1d4
commit
afbf8583bc
2
img.sh
2
img.sh
|
@ -3,7 +3,7 @@
|
|||
# Call with '-s' to target only a selection of the screen.
|
||||
|
||||
clientid='3e7a4deb7ac67da'
|
||||
img=$(date '+/tmp/%N.png')
|
||||
img=$(mktemp '/tmp/img-XXXXXX.png')
|
||||
|
||||
scrot -z "$@" $img >/dev/null 2>&1 || exit
|
||||
res=$(curl -sH "Authorization: Client-ID $clientid" -F "image=@$img" "https://api.imgur.com/3/upload")
|
||||
|
|
Loading…
Reference in New Issue