summaryrefslogtreecommitdiff
path: root/sh/u
blob: 68a86976af49a970ff49a983746cc4279bcc0410 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
# temporary solution before rewriting upd anc cfg to be better and more automated

ssh-add -l || ssh-add

for host in ca ka ia studio pp; 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