-
Notifications
You must be signed in to change notification settings - Fork 42
POSIX shell compliance #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hi @r2evans, I've adopted your changes a bit and pushed the current code to https://github.com/Red5d/pushbullet-bash/tree/r2evans-posixShell. So far the changes look good and it would be ok to merge from my side. @Red5d since this diverts a bit from "This is intended to be a pure Bash utility with no non-Bash dependencies." to posix compatibility I did not want to merge it right away. Are you ok with the merge? |
allow other curl options by defining CURLOPTS, default --silent
Signed-off-by: Felix Bartels <felix@host-consultants.de>
fbartels
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. The case can also be changed after merge imho.
if no objections from @Red5d I would merge at the end of the week.
| curlretcode=${2:-$ERR_UNK} | ||
| checkCurlReturnCode "$curlretcode" | ||
| case "$1" in | ||
| *"The param 'channel_tag' has an invalid value."*) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while this is a correct translation of the code, I think this is not that the original intention was. I think instead this should be
case ...
*"The param 'channel_tag' has an invalid value."* | *"The param 'device_iden' has an invalid value."*)
...
|
Merged. While it is a slight departure from being "pure Bash", it fits the intent of not requiring additional dependencies and can be run "as is". |
Remove bashisms so it can be run in a posix-shell environment. The impetus for this is running
pushbullet-bashon a DD-WRT (customizable wireless router) instance with/bin/shonly,bashis often not installed.