curtisbright / PhysicsCheck

Other
0 stars 2 forks source link

main.sh option parsing broken #9

Closed curtisbright closed 1 year ago

curtisbright commented 1 year ago

https://github.com/curtisbright/PhysicsCheck/blob/faae7bff4d63f6290ec38775fd3f8ec8db101db2/main.sh#L5-L11

The main script parses five flags using getopts but only has code for two of them. I'm not even sure what the intention behind line 9 is, as s is not used until it is overwritten on line 44. This also breaks displaying the help documentation which is the first thing I tried to run given that you said some options have changed (that will be the very first thing a new user will want to run).

BrianLi009 commented 1 year ago

changes pushed

curtisbright commented 1 year ago

It still doesn't work. Just try running it:

$ ./main.sh -h ./main.sh: illegal option -- h Invalid option: -. Only -p and -m are supported. Use -h or --help for help

BrianLi009 commented 1 year ago

I see, I initially wasn't sure what "breaks displaying the help documentation" means, will fix this, thanks!

BrianLi009 commented 1 year ago

-h or --help working properly. -p -m option properly passed in. script terminate with illegal option warming if other flags are passed in.