Skip to content

Conversation

@r2evans
Copy link
Contributor

@r2evans r2evans commented May 6, 2017

Remove bashisms so it can be run in a posix-shell environment. The impetus for this is running pushbullet-bash on a DD-WRT (customizable wireless router) instance with /bin/sh only, bash is often not installed.

@fbartels
Copy link
Collaborator

fbartels commented May 28, 2017

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?

@r2evans
Copy link
Contributor Author

r2evans commented May 29, 2017

@fbartels @Red5d

I updated the branch to reflect the merge of errorCodes, and this includes a change to README.

Copy link
Collaborator

@fbartels fbartels left a 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."*)
Copy link
Collaborator

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."*)
...

@Red5d Red5d merged commit 016f7e8 into Red5d:master Jun 6, 2017
@Red5d
Copy link
Owner

Red5d commented Jun 6, 2017

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".

@r2evans r2evans deleted the posixShell branch June 6, 2017 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants