Merge branch 'master' of github.com:archlinux/archinstall
This commit is contained in:
commit
0b3e822795
|
|
@ -32,16 +32,7 @@ def initialize_arguments():
|
||||||
parser.add_argument("--silent", action="store_true",
|
parser.add_argument("--silent", action="store_true",
|
||||||
help="Warning!!! No prompts, ignored if config is not passed")
|
help="Warning!!! No prompts, ignored if config is not passed")
|
||||||
parser.add_argument("--script", default="guided", nargs="?", help="Script to run for installation", type=str)
|
parser.add_argument("--script", default="guided", nargs="?", help="Script to run for installation", type=str)
|
||||||
parser.add_argument("--vars",
|
args, unknowns = parser.parse_known_args()
|
||||||
metavar="KEY=VALUE",
|
|
||||||
nargs='?',
|
|
||||||
help="Set a number of key-value pairs "
|
|
||||||
"(do not put spaces before or after the = sign). "
|
|
||||||
"If a value contains spaces, you should define "
|
|
||||||
"it with double quotes: "
|
|
||||||
'foo="this is a sentence". Note that '
|
|
||||||
"values are always treated as strings.")
|
|
||||||
args = parser.parse_args()
|
|
||||||
if args.config is not None:
|
if args.config is not None:
|
||||||
try:
|
try:
|
||||||
# First, let's check if this is a URL scheme instead of a filename
|
# First, let's check if this is a URL scheme instead of a filename
|
||||||
|
|
@ -57,13 +48,13 @@ def initialize_arguments():
|
||||||
print(e)
|
print(e)
|
||||||
# Installation can't be silent if config is not passed
|
# Installation can't be silent if config is not passed
|
||||||
config["silent"] = args.silent
|
config["silent"] = args.silent
|
||||||
if args.vars is not None:
|
for arg in unknowns:
|
||||||
try:
|
if '--' == arg[:2]:
|
||||||
for var in args.vars.split(' '):
|
if '=' in arg:
|
||||||
key, val = var.split("=")
|
key, val = [x.strip() for x in arg[2:].split('=', 1)]
|
||||||
config[key] = val
|
else:
|
||||||
except Exception as e:
|
key, val = arg[2:], True
|
||||||
print(e)
|
config[key] = val
|
||||||
config["script"] = args.script
|
config["script"] = args.script
|
||||||
return config
|
return config
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -445,5 +445,10 @@ else:
|
||||||
archinstall.arguments['profile'] = archinstall.Profile(None, archinstall.arguments.get('profile', None))
|
archinstall.arguments['profile'] = archinstall.Profile(None, archinstall.arguments.get('profile', None))
|
||||||
else:
|
else:
|
||||||
archinstall.arguments['profile'] = None
|
archinstall.arguments['profile'] = None
|
||||||
|
if archinstall.arguments.get('mirror-region', None) is not None:
|
||||||
|
selected_region = archinstall.arguments.get('mirror-region', None)
|
||||||
|
archinstall.arguments['mirror-region'] = {selected_region: archinstall.list_mirrors()[selected_region]}
|
||||||
|
archinstall.arguments['sys-language'] = archinstall.arguments.get('sys-language', 'en_US')
|
||||||
|
archinstall.arguments['sys-encoding'] = archinstall.arguments.get('sys-encoding', 'utf-8')
|
||||||
|
|
||||||
perform_installation_steps()
|
perform_installation_steps()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue