Optimized install and deinstall with Makefile
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
## Features 🚀
|
||||
|
||||
- **Installation & Setup:**
|
||||
Create executable wrappers with auto-detected commands (e.g. `main.sh` or `main.py`) and optional setup/teardown commands.
|
||||
Create executable wrappers with auto-detected commands (e.g. `main.sh` or `main.py`).
|
||||
|
||||
- **Git Operations:**
|
||||
Easily perform `git pull`, `push`, `status`, `commit`, `diff`, `add`, `show`, and `checkout` with extra parameters passed through.
|
||||
|
||||
@@ -16,7 +16,8 @@ def deinstall_repos(selected_repos, repositories_base_dir, bin_dir, all_repos, p
|
||||
print(f"Removed link for {repo_identifier}.")
|
||||
else:
|
||||
print(f"No link found for {repo_identifier} in {bin_dir}.")
|
||||
teardown_cmd = repo.get("teardown")
|
||||
repo_dir = get_repo_dir(repositories_base_dir,repo)
|
||||
if teardown_cmd and os.path.exists(repo_dir):
|
||||
run_command(teardown_cmd, cwd=repo_dir, 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 deinstall'...")
|
||||
run_command("make deinstall", cwd=repo_dir, preview=preview)
|
||||
@@ -78,5 +78,5 @@ def install_repos(selected_repos, repositories_base_dir, bin_dir, all_repos, no_
|
||||
# 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)
|
||||
print(f"Makefile found in {repo_identifier}, running 'make install'...")
|
||||
run_command("make install", cwd=repo_dir, preview=preview)
|
||||
|
||||
@@ -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["teardown"] = input("Teardown command (optional): ").strip()
|
||||
new_entry["alias"] = input("Alias (optional): ").strip()
|
||||
# Allow the user to mark this entry as ignored.
|
||||
ignore_val = input("Ignore this entry? (y/N): ").strip().lower()
|
||||
|
||||
Reference in New Issue
Block a user