mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 03:31:36 +01:00
22 lines
546 B
Python
Executable File
22 lines
546 B
Python
Executable File
#!/usr/bin/env python3
|
|
import common
|
|
parser = common.get_argparse(argparse_args={
|
|
'description': '''Print the value of a common.py variable.
|
|
|
|
This is useful to:
|
|
|
|
* give dry commands on the README that don't change when we refactor directory structure
|
|
* create simple bash scripts that call use common.py variables
|
|
|
|
For example, to get the Buildroot output directory for an ARM build, use:
|
|
|
|
....
|
|
./%(prog)s -a arm buildroot_out_dir
|
|
....
|
|
|
|
'''
|
|
})
|
|
parser.add_argument('variable')
|
|
args = common.setup(parser)
|
|
print(getattr(common, args.variable))
|