mirror of
https://github.com/kennethreitz/bake.git
synced 2026-06-05 23:00:17 +00:00
ermgahd
This commit is contained in:
+1
-10
@@ -303,10 +303,6 @@ class TaskScript(BaseAction):
|
||||
if sources is None:
|
||||
sources = []
|
||||
|
||||
stdlib_path = os.path.join(os.path.dirname(__file__), "scripts", "stdlib.sh")
|
||||
with open(stdlib_path, "r") as f:
|
||||
stdlib = f.read()
|
||||
|
||||
source_container = []
|
||||
|
||||
# Grab the first source line, for shebang comparison.
|
||||
@@ -335,11 +331,7 @@ class TaskScript(BaseAction):
|
||||
init_source = f"source <(bake --source {insert_source})"
|
||||
yield init_source
|
||||
|
||||
source_container += [
|
||||
stdlib,
|
||||
self.bashfile.funcs_source,
|
||||
self.bashfile.root_source,
|
||||
]
|
||||
source_container += [self.bashfile.funcs_source, self.bashfile.root_source]
|
||||
|
||||
main_source = "\n".join(source_container)
|
||||
|
||||
@@ -486,7 +478,6 @@ class Bakefile:
|
||||
yield (i, line.rstrip())
|
||||
else:
|
||||
yield (i, None)
|
||||
# yield (i, None)
|
||||
|
||||
@property
|
||||
def home(self):
|
||||
|
||||
+5
-5
@@ -240,8 +240,11 @@ def entrypoint(
|
||||
|
||||
if source == "__init__":
|
||||
source = random.choice(list(bakefile.tasks.keys()))
|
||||
source = bakefile.tasks[source].gen_source(
|
||||
remove_comments=True, include_shebang=True
|
||||
task = bakefile.tasks[source]
|
||||
source = task.gen_source(
|
||||
remove_comments=True,
|
||||
include_shebang=True,
|
||||
sources=[task.bashfile.funcs_source, task.bashfile.root_source],
|
||||
)
|
||||
else:
|
||||
task = bakefile.tasks[source]
|
||||
@@ -252,10 +255,7 @@ def entrypoint(
|
||||
include_shebang=True,
|
||||
)
|
||||
|
||||
# Giving up — it's just easier to do it here.
|
||||
# click.echo("#!/usr/bin/env bash")
|
||||
for source_line in source:
|
||||
# print(source_line)
|
||||
click.echo(source_line)
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user