Closed framps closed 4 months ago
Ooops..
For consistency, could you change it to if [ $INSTALL_METHOD = 'curl' ]; then
NP. I frankly use [[ ... ]]
all the time in my bash code because I don't like the =
operator. It's an assignment op for me and not a comparison op (I had a serious issue in my initial programming history because of this in C - used =
instead of ==
:cry: ) .
There are other benefits you get from [[
. Do you want me nevertheless to stick with =
?
I prefer to use double substitution (IIRC that's what it's called) only when needed, calculations for example.
In bash in substitution, = means EXACTLY, and == means "kinda", capital letters are accepted with == for example but not with =.
So yes, stick to that, there is a reason. :slightly_smiling_face:
if [ $INSTALL_METHOD = 'curl' ]; then
In bash in substitution, = means EXACTLY, and == means "kinda", capital letters are accepted with == for example but not with =.
That's new for me :astonished: Do you have any URL handy which explains this difference in detail?
Anyhow I will stick with =
:smiley:
I just detected there is a typo in the curl test :wink: