mirror of
https://github.com/suchmememanyskill/TegraExplorer.git
synced 2024-11-09 13:41:45 +00:00
gotta save those 2.9 seconds
This commit is contained in:
parent
e96ea63479
commit
e87301e160
2 changed files with 5 additions and 3 deletions
4
Makefile
4
Makefile
|
@ -113,9 +113,9 @@ $(BUILDDIR)/$(TARGET)/script/builtin.c: scripts/*.te
|
||||||
@mkdir -p "$(@D)"
|
@mkdir -p "$(@D)"
|
||||||
@mkdir -p "$(BUILDDIR)/$(TARGET)/scripts"
|
@mkdir -p "$(BUILDDIR)/$(TARGET)/scripts"
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
@py ts-minifier.py -d "$(BUILDDIR)/$(TARGET)/scripts" $(wildcard scripts/*.te)
|
@py ts-minifier.py --such-meme -d "$(BUILDDIR)/$(TARGET)/scripts" $(wildcard scripts/*.te)
|
||||||
@py te2c.py "$(BUILDDIR)/$(TARGET)/script/builtin" "$(BUILDDIR)/$(TARGET)/scripts"
|
@py te2c.py "$(BUILDDIR)/$(TARGET)/script/builtin" "$(BUILDDIR)/$(TARGET)/scripts"
|
||||||
else
|
else
|
||||||
@python3 ts-minifier.py -d "$(BUILDDIR)/$(TARGET)/scripts" $(wildcard scripts/*.te)
|
@python3 ts-minifier.py --such-meme -d "$(BUILDDIR)/$(TARGET)/scripts" $(wildcard scripts/*.te)
|
||||||
@python3 te2c.py "$(BUILDDIR)/$(TARGET)/script/builtin" "$(BUILDDIR)/$(TARGET)/scripts"
|
@python3 te2c.py "$(BUILDDIR)/$(TARGET)/script/builtin" "$(BUILDDIR)/$(TARGET)/scripts"
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -427,6 +427,8 @@ if __name__ == '__main__':
|
||||||
"and attempt to generate shorter names for reused variables \ndefault: false")
|
"and attempt to generate shorter names for reused variables \ndefault: false")
|
||||||
argparser.add_argument("-v", action="store_true", default=False,
|
argparser.add_argument("-v", action="store_true", default=False,
|
||||||
help="prints even more information to the console than usual")
|
help="prints even more information to the console than usual")
|
||||||
|
argparser.add_argument("--such-meme", action="store_true", default=False,
|
||||||
|
help="replaces destination file if it already exists \ndefault: false")
|
||||||
|
|
||||||
args = argparser.parse_args()
|
args = argparser.parse_args()
|
||||||
files = args.source
|
files = args.source
|
||||||
|
@ -448,7 +450,7 @@ if __name__ == '__main__':
|
||||||
logging.info("Stripping whitespace (pass 2)")
|
logging.info("Stripping whitespace (pass 2)")
|
||||||
r = whitespacent(r)
|
r = whitespacent(r)
|
||||||
file = path.splitext(path.basename(file))[0]
|
file = path.splitext(path.basename(file))[0]
|
||||||
if path.exists(path.join(dest, f"{file}.te")):
|
if path.exists(path.join(dest, f"{file}.te")) and not args.such_meme:
|
||||||
f = open(path.join(dest, f"{file}_min.te"), 'w')
|
f = open(path.join(dest, f"{file}_min.te"), 'w')
|
||||||
else:
|
else:
|
||||||
f = open(path.join(dest, f"{file}.te"), 'w')
|
f = open(path.join(dest, f"{file}.te"), 'w')
|
||||||
|
|
Loading…
Reference in a new issue