Closed alexander-bauer closed 1 year ago
Some explanatory notes I neglected to include above:
echo
s to use 1>&2
to redirect output to stderr
as opposed to stdout
; this doesn't much matter here, but keeps output from the script of operator interest consistently on stderr
, and programmatic output on stdout
.[[ -e "${MYVAR+x}" ]]
style tests to [[ -v MYVAR ]]
, to make them somewhat more succinct.API_TOKEN
, and then for both AUTH_EMAIL
and AUTH_KEY
, and fail loudly if both cases fail. I also extracted this to its own section which sets an AUTH_HEADERS
array, which is assembled into the final command at the end.IP
and PAYLOAD
determination/assembly more verbose, echoing each.Hey @alexander-bauer
Glad to hear that it is being used & thanks a lot for the contribution!🚀 I think these are definitely some reasonable changes. I will merge the PR and create a new release in the coming weeks.
Cheers Mirio
Hey @mirioeggmann, thank you for publishing this project -- I use it in my home environment, and it's saved me a lot of trouble.
I updated today and didn't RTFM, and so didn't notice that I needed to adjust some of the variables I supply. I took a crack at adjusting the script to be a bit more verbose, and to fail at earlier stages if the variables it requires aren't supplied.
I realize this is a substantial reorganization of the whole core logic, but hopefully you find it to your liking.
Thanks again! Sasha