mirror of
https://github.com/anklimov/lighthub
synced 2025-12-06 11:49:51 +03:00
NO Bash required (windows compilation problem gone) - migrated to python
build flags format simplified Binaries updated
This commit is contained in:
31
get_build_flags.py
Normal file
31
get_build_flags.py
Normal file
@@ -0,0 +1,31 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import print_function
|
||||
import os
|
||||
import sys
|
||||
print(sys.argv[1:], file=sys.stderr)
|
||||
#print("build_flags_"+sys.argv[1:][0])
|
||||
try:
|
||||
file = open("build-flags/build_flags_"+sys.argv[1:][0])
|
||||
except IOError as e:
|
||||
print(u'No build flags file ', file=sys.stderr)
|
||||
else:
|
||||
with file:
|
||||
for line in file.readlines():
|
||||
if not line.startswith('#'):
|
||||
print (line)
|
||||
file.close()
|
||||
|
||||
try:
|
||||
file = open("custom-build-flags/build_flags_"+sys.argv[1:][0])
|
||||
except IOError as e:
|
||||
print(u'No custom build flags file ', file=sys.stderr)
|
||||
else:
|
||||
with file:
|
||||
for line in file.readlines():
|
||||
if not line.startswith('#'):
|
||||
print (line)
|
||||
file.close()
|
||||
|
||||
sys.stdout.write("-DPIO_SRC_REV=")
|
||||
sys.stdout.flush()
|
||||
os.system("git log --pretty=format:%h_%ad -1 --date=short")
|
||||
Reference in New Issue
Block a user