summaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorXiao Pan <xyz@flylightning.xyz>2024-08-02 15:28:43 -0700
committerXiao Pan <xyz@flylightning.xyz>2024-08-02 15:28:43 -0700
commitd7b14b02e6483662569429d01758a79a16c0114e (patch)
treeb57212f725ca05d4bb7ab29236370d812f031161 /sh
parent7db25f07911966cc271f13b5d48a6cf55e88d115 (diff)
sb -m flag to run clis in current computer also
Diffstat (limited to 'sh')
-rwxr-xr-xsh/sb5
1 files changed, 5 insertions, 0 deletions
diff --git a/sh/sb b/sh/sb
index 5c46adb..4737971 100755
--- a/sh/sb
+++ b/sh/sb
@@ -1,6 +1,11 @@
#!/bin/sh
# Ssh Branches
+case "$1" in
+ # also run commands in current Master computer
+ '-m') shift; "$@";;
+esac
+
for branch in $(git -C "$HOME/programs/config_local_arch" branch | awk '!/master/{print ($1=="*")?$2:$1}'); do
echo "sshing to server $branch..."
ssh -t "$branch" '. "$HOME/.profile";' "$@"