1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

boards generator: new option --allgen (#4614)

useful when changing and pushing updates
This commit is contained in:
david gauchard 2018-04-07 20:16:04 +02:00 committed by GitHub
parent 3a110aa698
commit 149af7618c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1215,8 +1215,11 @@ def package ():
if packagegen:
pkgfname_read = pkgfname + '.orig'
# check if backup already exists
if not os.path.isfile(pkgfname_read):
os.rename(pkgfname, pkgfname_read)
if os.path.isfile(pkgfname_read):
print "package file is in the way, please move it"
print " %s" % pkgfname_read
sys.exit(1)
os.rename(pkgfname, pkgfname_read)
# read package file
with open (pkgfname_read, "r") as package_file:
@ -1302,6 +1305,8 @@ def usage (name,ret):
print " --packagegen - replace board:[] in package"
print " --doc - shows doc/boards.rst"
print " --docgen - replace doc/boards.rst"
print " --allgen - generate and replace everything"
print " (useful for pushing on github)"
print ""
out = ""
@ -1347,7 +1352,8 @@ customspeeds = []
try:
opts, args = getopt.getopt(sys.argv[1:], "h",
[ "help", "lwip=", "led=", "speed=", "board=", "customspeed=", "nofloat",
"ld", "ldgen", "boards", "boardsgen", "package", "packagegen", "doc", "docgen" ])
"ld", "ldgen", "boards", "boardsgen", "package", "packagegen", "doc", "docgen",
"allgen"] )
except getopt.GetoptError as err:
print str(err) # will print something like "option -a not recognized"
usage(sys.argv[0], 1)
@ -1417,6 +1423,16 @@ for o, a in opts:
docshow = True
docgen = True
elif o in ("--allgen"):
ldshow = True
ldgen = True
boardsshow = True
boardsgen = True
packageshow = True
packagegen = True
docshow = True
docgen = True
else:
assert False, "unhandled option"