Rizin
unix-like reverse engineering framework and cli tools
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
v
w
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Enumerations
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Enumerator
b
d
e
h
i
k
n
p
r
s
w
Properties
Events
Related Functions
Files
File List
File Members
All
$
.
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
.
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Events
Friends
Macros
Modules
Pages
version.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
#
3
# SPDX-FileCopyrightText: 2021 ret2libc <sirmy15@gmail.com>
4
# SPDX-License-Identifier: LGPL-3.0-only
5
6
""" Portable python script to read version from meson.build until meson provides a proper way """
7
8
import
os
9
import
sys
10
11
meson_file =
"meson.build"
12
if
len
(sys.argv) > 1:
13
meson_file = os.path.join(sys.argv[1], meson_file)
14
15
with
open(meson_file,
"r"
, encoding=
"utf8"
)
as
f:
16
# Read only first 10 lines of the meson file, looking for 'version: ' string
17
for
i
in
range
(10):
18
fields = [x.strip()
for
x
in
f.readline().
strip
().split(
":"
)]
19
if
fields[0] ==
"version"
:
20
fields = fields[1].split(
"'"
)
21
sys.stdout.write(fields[1] +
"\n"
)
22
sys.exit(0)
23
24
sys.exit(1)
len
size_t len
Definition:
6502dis.c:15
capstone.range
range
Definition:
__init__.py:6
cmd_descs_generate.strip
def strip(s)
Definition:
cmd_descs_generate.py:148
sys
version.py
Generated by
1.9.1