Skip to content

Replace with $( ) inside strings and in commands#77

Merged
jwerle merged 3 commits intobpkg:masterfrom
Razerban:master
Feb 6, 2017
Merged

Replace with $( ) inside strings and in commands#77
jwerle merged 3 commits intobpkg:masterfrom
Razerban:master

Conversation

@Razerban
Copy link
Contributor

Replaced with $( ) because it's the new standard in shell scripting

;;
esac
done
done }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why wrap this in {} ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot to remove the {}
You're right, it doesn't make any sense.

@@ -1 +1,3 @@
{"key":"hello this is a string"} No newline at end of file
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why modify these test files?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the way JSON files needs to be formatted according to the convention.

  • it doesn't interfere with the content of the JSON file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand that. However, the JSON implementation is an upstream of https://github.com/dominictarr/JSON.sh and should not be modified.

Copy link
Contributor Author

@Razerban Razerban Feb 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see.
I didn't know that. Maybe you should mention it in credit section in the ReadMe file !
I'll drop the changes to the JSON files in lib/json.

@jwerle
Copy link
Member

jwerle commented Feb 6, 2017

@abdelkafiahmed thank you!

@jwerle jwerle merged commit 0617f26 into bpkg:master Feb 6, 2017
eval local val="\${${key}}"
[ -z "${val}" ] && error "Missing \`${key}' property"
[ -z "${val}" ] && error "Missing \`
${key}' property"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this line break intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it's not intentional !! My bad !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants