mirror of
https://github.com/Ai-Thinker-Open/Ai-Thinker-Open_RTL8710BX_ALIOS_SDK.git
synced 2026-08-27 17:01:31 +00:00
rel_1.6.0 init
This commit is contained in:
commit
27b3e2883d
19359 changed files with 8093121 additions and 0 deletions
34
Living_SDK/build/scripts/gen_output.py
Normal file
34
Living_SDK/build/scripts/gen_output.py
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: UTF-8 -*-
|
||||
|
||||
import sys, os, re
|
||||
|
||||
def gen_readme_file(bin_output_path, version):
|
||||
readmename = os.path.join(bin_output_path, "readme.txt")
|
||||
with open(readmename, "w") as f:
|
||||
f.write("version : " + version + " \r\n")
|
||||
|
||||
def find_version(config_file):
|
||||
version = None
|
||||
with open(config_file, "r") as f:
|
||||
config_mk_str = f.read()
|
||||
find_str = re.search( r'DSYSINFO_APP_VERSION=.*', config_mk_str, re.M|re.I)
|
||||
if find_str:
|
||||
version = find_str.group()
|
||||
version = version.replace('DSYSINFO_APP_VERSION=', '')
|
||||
version = version.replace('\\"', '')
|
||||
version = version.split()[0]
|
||||
|
||||
return version
|
||||
|
||||
def main():
|
||||
bin_output_path = sys.argv[1]
|
||||
config_file = sys.argv[2]
|
||||
|
||||
version = find_version(config_file)
|
||||
if version:
|
||||
gen_readme_file(bin_output_path, version)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue