Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nigel Kukard
IDMS Linux Installer
Commits
d7b32f4f
Commit
d7b32f4f
authored
Jun 17, 2019
by
Nigel Kukard
Browse files
Added commandline argument parser
parent
cc9c20b8
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/idmslinux_installer/commandline.py
View file @
d7b32f4f
...
...
@@ -15,14 +15,27 @@
"""Entry point into the IDMS Linux installer from the commandline."""
import
argparse
from
idmslinux_installer.ili
import
Ili
def
main
():
"""Entry point for execution from the commandline."""
print
(
'IDMS Linux Installer v{ili.__version__} - Copyright © 2019, AllWorldIT.
\n
'
)
# Start argument parser
argparser
=
argparse
.
ArgumentParser
(
add_help
=
False
)
# Create argument group for optionals
optional_group
=
argparser
.
add_argument_group
(
'Optional arguments'
)
optional_group
.
add_argument
(
'-h'
,
'--help'
,
action
=
"help"
,
help
=
"Show this help message and exit"
)
# Parse args
args
=
argparser
.
parse_args
()
installer
=
Ili
()
installer
.
tes
t
()
installer
.
star
t
()
if
__name__
==
'__main__'
:
...
...
src/idmslinux_installer/ili.py
View file @
d7b32f4f
...
...
@@ -68,7 +68,7 @@ class Ili:
# Set output callback
self
.
state
.
output_callback
=
self
.
_status_callback
def
tes
t
(
self
):
def
star
t
(
self
):
"""Testing during development."""
if
not
self
.
state
.
install_disks
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment