I found this line in one of our repositories without any comments explaining what it does. I am fixing a bug that I found in this repository and don't know what to make of this line. I am unsure of how to research for this in a time efficient manner, so I'm asking here.
[ "$foo_user" = 'foo' ] && foo_user='bar' || true
It looks like an if statement that tests if
$foo_user='foo' then return true, and then sets
foo_user to "bar" if it is not set? I really have no idea what to make of this.
What does this code do?