Use mktemp instead of date for safety

master
Daniel Schep 2014-10-23 15:45:25 -04:00
parent bae2bbb1d4
commit afbf8583bc
1 changed files with 1 additions and 1 deletions

2
img.sh
View File

@ -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")