fix: noconfirm auto-selects first AUR match
This commit is contained in:
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import sys
|
||||
import shlex
|
||||
|
||||
do_print = False
|
||||
|
||||
if len(sys.argv) > 1:
|
||||
do_print = bool(sys.argv[1])
|
||||
|
||||
if 'MESONINTROSPECT' not in os.environ:
|
||||
raise RuntimeError('MESONINTROSPECT not found')
|
||||
|
||||
mesonintrospect = os.environ['MESONINTROSPECT']
|
||||
|
||||
introspect_arr = shlex.split(mesonintrospect)
|
||||
|
||||
# print(mesonintrospect)
|
||||
# print(introspect_arr)
|
||||
|
||||
some_executable = introspect_arr[0]
|
||||
|
||||
if not os.path.isfile(some_executable):
|
||||
raise RuntimeError(f'{mesonintrospect!r} does not exist')
|
||||
|
||||
if do_print:
|
||||
print(some_executable, end='')
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import shlex
|
||||
import subprocess
|
||||
|
||||
|
||||
if 'MESONINTROSPECT' not in os.environ:
|
||||
raise RuntimeError('MESONINTROSPECT not found')
|
||||
if 'MESON_BUILD_ROOT' not in os.environ:
|
||||
raise RuntimeError('MESON_BUILD_ROOT not found')
|
||||
|
||||
mesonintrospect = os.environ['MESONINTROSPECT']
|
||||
introspect_arr = shlex.split(mesonintrospect)
|
||||
|
||||
buildroot = os.environ['MESON_BUILD_ROOT']
|
||||
|
||||
subprocess.check_output([*introspect_arr, '--all', buildroot])
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
project('mesonintrospect from scripts')
|
||||
|
||||
python = import('python3').find_python()
|
||||
|
||||
ret = run_command(python, ['check_env.py', '1'], check: false)
|
||||
if ret.returncode() == 0
|
||||
find_program(ret.stdout())
|
||||
else
|
||||
message(ret.stdout())
|
||||
message(ret.stderr())
|
||||
endif
|
||||
|
||||
meson.add_postconf_script('check_introspection.py')
|
||||
meson.add_install_script('check_env.py')
|
||||
Reference in New Issue
Block a user