-
Notifications
You must be signed in to change notification settings - Fork 10
refactor argument parsing #37
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -708,20 +708,54 @@ destroy() { | |||||||||||||||||||||||||||||||
| sudo rm -fr /export/testing/$env | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| case "$1" in | ||||||||||||||||||||||||||||||||
| help) usage;; | ||||||||||||||||||||||||||||||||
| -h) usage;; | ||||||||||||||||||||||||||||||||
| init) init;; | ||||||||||||||||||||||||||||||||
| list) list;; | ||||||||||||||||||||||||||||||||
| package) package ${@:2};; | ||||||||||||||||||||||||||||||||
| deploy) deploy ${@:2};; | ||||||||||||||||||||||||||||||||
| launch) launch $2;; | ||||||||||||||||||||||||||||||||
| test) test;; | ||||||||||||||||||||||||||||||||
| dev) dev ${@:2};; | ||||||||||||||||||||||||||||||||
| agentscp) agentscp ${@:2};; | ||||||||||||||||||||||||||||||||
| ssh) issh root@$2;; | ||||||||||||||||||||||||||||||||
| start) start $2;; | ||||||||||||||||||||||||||||||||
| stop) stop $2;; | ||||||||||||||||||||||||||||||||
| destroy) destroy $2;; | ||||||||||||||||||||||||||||||||
| *) usage;; | ||||||||||||||||||||||||||||||||
| command=$1 | ||||||||||||||||||||||||||||||||
| shift | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| case "$command" in | ||||||||||||||||||||||||||||||||
| help) usage | ||||||||||||||||||||||||||||||||
| ;; | ||||||||||||||||||||||||||||||||
| init) | ||||||||||||||||||||||||||||||||
| init | ||||||||||||||||||||||||||||||||
| ;; | ||||||||||||||||||||||||||||||||
| list) | ||||||||||||||||||||||||||||||||
| list | ||||||||||||||||||||||||||||||||
| ;; | ||||||||||||||||||||||||||||||||
| package) | ||||||||||||||||||||||||||||||||
| package "$@" | ||||||||||||||||||||||||||||||||
| # ${@:2} | ||||||||||||||||||||||||||||||||
| ;; | ||||||||||||||||||||||||||||||||
| deploy) | ||||||||||||||||||||||||||||||||
| deploy "$@" | ||||||||||||||||||||||||||||||||
| # ${@:2} | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
| # ${@:2} | |
| ;; | |
| deploy) | |
| deploy "$@" | |
Copilot
AI
Aug 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the commented out code # ${@:2} as it's no longer needed after the refactoring. Dead code should be cleaned up to improve maintainability.
| # root@$2 | |
| ;; | |
| agentscp) | |
| agentscp "$@" | |
| ;; | |
| ssh) | |
| issh "root@$1" |
Copilot
AI
Aug 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the commented out code # ${@:2} as it's no longer needed after the refactoring. Dead code should be cleaned up to improve maintainability.
| # root@$2 | |
| ;; | |
| agentscp) | |
| agentscp "$@" | |
| ;; | |
| ssh) | |
| issh "root@$1" |
Copilot
AI
Aug 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the commented out code # root@$2 as it's no longer needed after the refactoring. Dead code should be cleaned up to improve maintainability.
| # root@$2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the commented out code
# ${@:2}as it's no longer needed after the refactoring. Dead code should be cleaned up to improve maintainability.