From: Edward Delaporte Date: Tue, 27 Jan 2026 22:29:58 +0000 (-0600) Subject: Update for setup invoke X-Git-Url: https://us-delaporte.pagekite.me/gitweb/dotfiles.git/commitdiff_plain/1b3104f5a38080cd752a903dca6946ead6c2ef58 Update for setup invoke --- diff --git a/invoke/setup-linux/tasks.py b/invoke/setup-linux/tasks.py index 520b607..3587e7e 100644 --- a/invoke/setup-linux/tasks.py +++ b/invoke/setup-linux/tasks.py @@ -12,6 +12,7 @@ DOTFILES=f'{HOME}/dotfiles' @task def setup_vi(c): + c.run('sudo apt-get install vim -y') c.run(f'ln -s {DOTFILES}/files/vimrc {HOME}/.vimrc') c.run(f'ls -al {HOME} | grep vimrc') c.run(f'mkdir -p {HOME}/.swp') @@ -24,7 +25,11 @@ def debug(c): def install_librewolf(c): c.run(f'$HOME/dotfiles/install/librewolf.sh') -@task(install_librewolf, setup_vi) +@task +def install_git(c): + c.run('sudo apt-get install git -y') + +@task(install_librewolf, setup_vi, install_git) def bare_minimum(c): pass @@ -38,6 +43,26 @@ def ssh_key(c): def screen(c): c.run(f'sudo apt-get install screen -y') c.run(f'$HOME/dotfiles/setup/screen.sh') - - +@task +def list_ports(c): + c.run('sudo netstat -tunlp') + +@task +def link_to_home(c, path, add_dot=False): + filename = os.path.basename(path) + if(add_dot): + filename = f'.{filename}' + + if(os.path.exists(f'{HOME}/{filename}')): + print(f'WARNING: {HOME}/{filename} exists.') + else: + c.run(f'ln -s {HOME}/dotfiles/{path} {HOME}/{filename}') + c.run(f'ls -la {HOME} | grep {filename}') + + + +@task +def link_all_for_invoke(c): + link_to_home(c, 'files/pc/tasks.py') + link_to_home(c, 'files/pc/bashrc', add_dot=True)