summaryrefslogtreecommitdiff
path: root/sh/u
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2024-04-19 19:56:03 -0700
committerXiao Pan <gky44px1999@gmail.com>2024-04-19 19:56:03 -0700
commit8727c421a2a84332b7a18a636c3ab470bda996e6 (patch)
tree382043325ec5d2b3ad219dd1af915ac537bfaebb /sh/u
parent7a00edccbfcc86bab1d63bb0c60dc3e676e78770 (diff)
move u from cfgl to fsh, better and more automated u
Diffstat (limited to 'sh/u')
-rwxr-xr-xsh/u18
1 files changed, 18 insertions, 0 deletions
diff --git a/sh/u b/sh/u
new file mode 100755
index 0000000..e169af1
--- /dev/null
+++ b/sh/u
@@ -0,0 +1,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; exec "$SHELL" -l'
+done
+
+upd