mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-05-28 13:40:37 +08:00
tools(ci): add script to build all examples
Using new cmake project declare.
This commit is contained in:
27
tools/ci/envsubst.py
Executable file
27
tools/ci/envsubst.py
Executable file
@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# A script similar to GNU envsubst, but filters out
|
||||
# some CI related variables.
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
# Sanitize environment variables
|
||||
vars_to_remove = []
|
||||
for var_name in os.environ.keys():
|
||||
if var_name.startswith('CI_'):
|
||||
vars_to_remove.append(var_name)
|
||||
for var_name in vars_to_remove:
|
||||
del os.environ[var_name]
|
||||
|
||||
for line in sys.stdin:
|
||||
if not line:
|
||||
break
|
||||
sys.stdout.write(os.path.expandvars(line))
|
||||
sys.stdout.flush()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
Reference in New Issue
Block a user