querqy / chorus

Towards an open source stack for e-commerce search
Apache License 2.0
141 stars 33 forks source link

add helpers and settings for readability and check all prerequisites … #139

Closed depahelix2021 closed 1 year ago

depahelix2021 commented 1 year ago

…before exiting the script. This way users don't have to stop and start several times if they are missing any of the prerequisite commands. Just check them all and tell the user which ones we don't have, and then exit if there are any missing. This also makes it quicker and easier to add more prerequisite commands later by just adding additional commands to the list of those required. I have more changes to make, but this change is pretty self-contained. The settings and helpers scripts help move some supporting logic to the side which helps to make quickstart.sh a bit easier to read.

epugh commented 1 year ago

Thanks for this! So... I am trying to balance the "is this scripting meant as code or is it meant as a helper..." I.e, one of the goals of Chorus is that while you might use the quickstart.sh, you are also sort of meant to run all the commands you self to some large extent in order to understand what is going on.

However, I agree that there is a lot of code in quickstart.sh that is starting to obfuscate what all is going on... So... I think I like the direction that you took with the helpers.sh script. However, I think having the settings kind of up front at the top of the quickstart.sh makes more sense in terms of understanding what is changeable... What if you move the TRUE and FALSE definitions into the helpers.sh and then the other settings back into quickstart.sh.. that way we dont' have too many shell scripts... but get some nice clean up...?

depahelix2021 commented 1 year ago

How is that?