Skip to content
This repository has been archived by the owner on Feb 11, 2024. It is now read-only.

Clean up our main script #65

Open
jvoisin opened this issue Feb 21, 2018 · 5 comments
Open

Clean up our main script #65

jvoisin opened this issue Feb 21, 2018 · 5 comments

Comments

@jvoisin
Copy link
Owner

jvoisin commented Feb 21, 2018

Currently, our main script's code looks quite ugly. It would be nice if someone with some shell-fu could take a look at it, and clean it up.

@mdeous
Copy link
Collaborator

mdeous commented Mar 1, 2018

Maybe rewrite the whole thing in Go? ;)
(got a working rewrite in Go, we really should test it someday!)

@ahpnils
Copy link
Contributor

ahpnils commented Mar 23, 2019

Do you think a script based on the Bash3 boilerplate and trying to show little to no errors from ShellCheck would be a good idea ?

I'm worried the MIT licence from the Bash3 boilerplate can be an issue...

@jvoisin
Copy link
Owner Author

jvoisin commented Mar 24, 2019

I'm not a big fan of bringing in a whole external dependency for our simple'n'stupid bash script tbh :/

But the shellcheck idea is great, I think that we ran it on the codebase at some point.

@ahpnils
Copy link
Contributor

ahpnils commented Mar 24, 2019

I don't see it as importing a whole external dependency, but rather using some ideas (see the Scoping, Coding style and Safety and Portability parts on b3bp website) or some parts of it. For instance, I started to :

  • switch to local variables ;
  • switch to stricts options for bash ;
  • use brace expansions.

@jvoisin
Copy link
Owner Author

jvoisin commented Mar 24, 2019

Be my guest if you want to improve the script, I'll be happy to review your PR :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants