#!/bin/sh # temporary solution before rewriting upd anc cfg to be better and more automated ssh-add -l || ssh-add for host in $(git -C "$HOME/programs/config_local_arch" branch | awk '{print ($1=="*")?$2:$1}' | grep -v master); do # alacritty use -T to change window name so I can identify different servers # need to invoke bash afterwards for manual things like reboot if linux upgrades and pacdiff # maybe can automate further so no need manual things # need `bash -l` to invoke as login shell, so no need source .profile and inputrc/readline also works # https://superuser.com/questions/306530/run-remote-ssh-command-with-full-login-shell # maybe another way: # https://superuser.com/questions/241187/how-do-i-reload-inputrc # because I invoke bash, no need alacritty --hold o alacritty -T "$host" -e ssh -t "$host" '. "$HOME/.profile" && upd; "$SHELL" -l' done upd