source /a/bin/distro-functions/src/identify-distros
source /a/bin/distro-functions/src/package-manager-abstractions
source /a/bin/log-quiet/logq-function
-source /a/bin/small-misc-bash/psg-function
# for x in /a/bin/bash_unpublished/source-!(.#*); do echo source $x; done
source /a/bin/bash_unpublished/source-semi-priv
source /a/bin/bash_unpublished/source-state
# do all tee.
# pipe to this, or just type like a shell
+# todo: test this
dat() {
- tee >(ssh frodo.b8.nz bash -l) >(ssh x2 bash -l) >(ssh tp.b8.nz bash -l) >(ssh kw bash -l) >(ssh tp.b8.nz bash -l)
+ tee >(ssh frodo.b8.nz) >(ssh x2) >(ssh tp.b8.nz) >(ssh kw) >(ssh tp.b8.nz)
}
da() { # do all
local host
# By default .bashrc is sourced for ALL ssh commands. This is wonky.
# Normally, this file is not sourced when a script is run, but we can
-# override that by having #!/bin/bash -l. I want the same thing for ssh
+# override that by sourcing ~/.bashrc. I want the same thing for ssh
# commands. when a local script runs an ssh command, bashrc should not be
# sourced, unless we use a modified command.
#
type=${tmp2: -1}
if [[ $type == b ]]; then
info_sec=${tmp::10}
- if (( $(stat -c%Y /b/ds/brc) > info_sec || $(stat -c%Y /b/ds/.bashrc) > info_sec )); then
- dorsync=true
- rm -f $sshinfo
- fi
+ for f in /b/ds/sl/.iank/*; do
+ if (( $(stat -L -c%Y $f) > info_sec )); then
+ dorsync=true
+ rm -f $sshinfo
+ break
+ fi
+ done
fi
else
dorsync=true
if [[ -t 0 ]]; then
BRC=t command ssh "${args[@]}" "$remote" ${@@Q}
else
- command ssh "${args[@]}" "$remote" BRC=t bash -l
+ command ssh "${args[@]}" "$remote" BRC=t bash
fi
fi
}