Commit 706ec871 authored by Michael Murtaugh's avatar Michael Murtaugh
Browse files

switch to quiet by default in smake -- added notquiet option, fixed SConstruct...

switch to quiet by default in smake -- added notquiet option, fixed SConstruct to use INDEX_TEMPLATE, INDEX_SCRIPTS, and INDEX_STYLESHEETS env
parent d4ebf768
......@@ -258,10 +258,10 @@ def add_attribute_to_links (src, attrname, attrvalue):
return innerHTML(t)
def template_action (target, source, env):
tpath, tname = os.path.split(env.Dictionary().get("INDEX_TEMPLATE", "templates/index.html"))
tpath, tname = os.path.split((env.Dictionary().get("INDEX_TEMPLATE") or "templates/index.html"))
rootpath = os.path.abspath(env.Dictionary().get("SCONS_ROOT"))
index_scripts = env.Dictionary().get("INDEX_SCRIPTS", "").split(":")
index_stylesheets = env.Dictionary().get("INDEX_STYLESHEETS", "").split(":")
index_scripts = (env.Dictionary().get("INDEX_SCRIPTS") or "").split(":")
index_stylesheets = (env.Dictionary().get("INDEX_STYLESHEETS") or "").split(":")
# print (f"template_action, rootpath: {rootpath}")
jenv = jinja2.Environment(loader=jinja2.FileSystemLoader(tpath))
......@@ -466,9 +466,8 @@ for folder, deps in depwalk("."):
env.FolderMeta(target=folder_meta_path, source=deps+depsmeta)
index_stylesheets =
env.Template(target=os.path.join(folder, "index.html"), \
source=[folder_meta_path, File(template_path)], \
source=folder_meta_path, \
INDEX_SCRIPTS=os.environ.get("INDEX_SCRIPTS"), \
......@@ -14,7 +14,7 @@ def main (args):
env = os.environ.copy()
env['INDEX_TEMPLATE'] = template_path
cmd = ["scons", "-f", sconstruct_path] + args.path
if args.quiet:
if not args.notquiet:
if args.root:
env['SCONS_ROOT'] = args.root
......@@ -29,7 +29,8 @@ def add_subparser (subparsers):
# usage: go to root folder
p.add_argument('--root', help='root, default .')
p.add_argument('--quiet', action="store_true", default=False)
p.add_argument('--quiet', action="store_true", default=True, help="deprecated, now quiet by default unless you give --notquiet")
p.add_argument('--notquiet', action="store_true", default=False)
p.add_argument('path', nargs="*")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment