From 516d99bb3474a4ff29d9c6358bf3adec71f9e05a Mon Sep 17 00:00:00 2001 From: Kendall Whitman Date: Tue, 3 Feb 2026 11:29:42 -0600 Subject: [PATCH] fix python errors --- install-arch.py | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/install-arch.py b/install-arch.py index 90eff31..50a81aa 100644 --- a/install-arch.py +++ b/install-arch.py @@ -1,4 +1,5 @@ from pathlib import Path +import subprocess def sym_link_folders() -> void: target_folder = input("Specify the path to the target folder (full path must be used): ") @@ -13,7 +14,14 @@ def sym_link_folders() -> void: ] for folder in FOLDERS: - Path(f"/run/media/1TB/{folder}").symlink_to(f"~/{folder}") + if Path(f"{Path.home()}/{folder}").is_dir() and not Path(f"{Path.home()}/{folder}").is_symlink(): + Path(f"{Path.home()}/{folder}").rmdir() + Path(f"{Path.home()}/{folder}").symlink_to(f"{target_folder}/{folder}") + + if Path(f"{Path.home()}/Templates").is_dir(): + Path(f"{Path.home()}/Templates").rmdir() + if Path(f"{Path.home()}/Public").is_dir(): + Path(f"{Path.home()}/Public").rmdir() def install_apps() -> void: APPS = [ @@ -32,16 +40,20 @@ def install_apps() -> void: ] for app in APPS: - subprocess.run(['sudo', 'pacman', '-S', {app}, '--noconfirm']) + subprocess.run(['sudo', 'pacman', '-S', f"{app}", '--noconfirm']) - subprocess.run(['fisher', 'install', 'jorgebucaran/nvm.fish']) - subprocess.run(['nvm', 'install', 'lts']) + subprocess.run([ + "fish", "-c", "fisher install jorgebucaran/nvm.fish" + ], check=True) + + subprocess.run([ + "fish", "-c", "nvm install lts" + ], check=True) def stow_dot_files() -> void: DOTFILES = [ - 'bash', - 'konsole', - 'menus', + 'alacritty', + 'fish', 'nvim', 'rtorrent', 'tmux', @@ -49,7 +61,7 @@ def stow_dot_files() -> void: ] for dotfile in DOTFILES: - subprocess.run(['stow', {dotfile}, '--adopt']) + subprocess.run(['stow', f"{dotfile}", '--adopt']) subprocess.run(['git', 'checkout', '--', '.'])