Substituted setup key in configuration through Makefile

This commit is contained in:
Kevin Veen-Birkenbach
2025-03-13 21:35:26 +01:00
parent 22dfcf7b61
commit 40c232f4a3
2 changed files with 6 additions and 5 deletions

View File

@@ -39,10 +39,6 @@ def install_repos(selected_repos, repositories_base_dir, bin_dir, all_repos, no_
# Create the symlink using create_ink.
create_ink(repo, repositories_base_dir, bin_dir, all_repos, quiet=quiet, preview=preview)
setup_cmd = repo.get("setup")
if setup_cmd:
run_command(setup_cmd, cwd=repo_dir, preview=preview)
# Check if a requirements.yml file exists and install additional packages.
req_file = os.path.join(repo_dir, "requirements.yml")
@@ -78,3 +74,9 @@ def install_repos(selected_repos, repositories_base_dir, bin_dir, all_repos, no_
if pip_packages:
cmd = "python3 -m pip install " + " ".join(pip_packages)
run_command(cmd, preview=preview)
# Check if a Makefile exists and run make.
makefile_path = os.path.join(repo_dir, "Makefile")
if os.path.exists(makefile_path):
print(f"Makefile found in {repo_identifier}, running 'make'...")
run_command("make", cwd=repo_dir, preview=preview)

View File

@@ -11,7 +11,6 @@ def interactive_add(config,USER_CONFIG_PATH:str):
new_entry["command"] = input("Command (optional, leave blank to auto-detect): ").strip()
new_entry["description"] = input("Description (optional): ").strip()
new_entry["replacement"] = input("Replacement (optional): ").strip()
new_entry["setup"] = input("Setup command (optional): ").strip()
new_entry["teardown"] = input("Teardown command (optional): ").strip()
new_entry["alias"] = input("Alias (optional): ").strip()
# Allow the user to mark this entry as ignored.