Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add possibility to select option via arguments #24

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jellekralt
Copy link

Hey! I needed a way to automate the script, which would only work through passing the option via arguments, so that's exactly what I added :)

@tr3kl0v
Copy link
Owner

tr3kl0v commented Jan 27, 2023

Today there is the options to use flags. When using the -x flag for debugging reasons, this change generates the following error:

./stop-sauron.sh: line 58: [: -x: integer expression expected

@jellekralt
Copy link
Author

Decided to rewrite it a bit and switch to using a flag (-o) for the option selection. I previously solved it without a flag because I figured it would be prepared for a possible subcommand setup later on. However, this needs bigger refactoring so for now lets keep it as a flag (which is much less complicated and guarantees interoperability with the -x flag).

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

Successfully merging this pull request may close these issues.

None yet

2 participants