From: Jannis Harder Date: Mon, 11 Apr 2022 15:35:11 +0000 (+0200) Subject: Add envvar to enable automatic .gitignore creation for workdirs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a1909940980fce4efd710a6cff9f874ae7ffa9d0;p=SymbiYosys.git Add envvar to enable automatic .gitignore creation for workdirs --- diff --git a/sbysrc/sby.py b/sbysrc/sby.py index 5616bc0..d28cd29 100644 --- a/sbysrc/sby.py +++ b/sbysrc/sby.py @@ -415,6 +415,10 @@ def run_task(taskname): my_opt_tmpdir = True my_workdir = tempfile.mkdtemp() + if os.getenv("SBY_WORKDIR_GITIGNORE"): + with open(f"{my_workdir}/.gitignore", "w") as gitignore: + print("*", file=gitignore) + junit_ts_name = os.path.basename(sbyfile[:-4]) if sbyfile is not None else workdir if workdir is not None else "stdin" junit_tc_name = taskname if taskname is not None else "default"