Compare commits

..

2 Commits

Author SHA1 Message Date
xiongdian.me
bf726ea5cc riot: remove unknown domain warn 2023-11-06 19:19:08 +08:00
483f7fd7f3
[dev] nixos; riot multiple targets; install without ssh keys (#42)
* auth: add .eid/authorized_certificates for pam pkcs11 auth

* .zshrc: alias sl for sudo zsh -l

* to-install: nix

* zshrc: use gnu ls on mac

* zshrc: try to use gnu-ls

* try to fix ci for macos

* riot: add domain box[0-9]

* riot: shortcuts i,x,j

* .zshrc: warn if not in main channel

* sagt: reset agent so paths

* sagt: import ssh-agent -P paths

* common.sh: is_port_free and get_free_port

* riot use get_free_port to fix issue on windows

* riot: ssh support instant command

* riot: proxy delimiter from comma (,) to slash (/)

* riot: support multiple remotes, delimiter=comma (,)

* riot: fix ci; install.sh: --no-ssh

* riot: improve ci

---------

Co-authored-by: xiongdian.me <xiongdian.me@bytedance.com>
2023-11-06 19:13:22 +08:00
3 changed files with 6 additions and 2 deletions

View File

@ -149,6 +149,9 @@ install_symlink()
{
fmt_note "installing symlinks ..."
for ((i=0; i<${#HOME_SYMLINKS_SRC[@]}; i++)); do
if [[ -z "${HOME_SYMLINKS_SRC[$i]}" ]]; then
continue
fi
local src="$DOTFILES/${HOME_SYMLINKS_SRC[$i]}"
local dst="$HOME/${HOME_SYMLINKS_DST[$i]}"
fmt_info "creating symlink \"$dst\" --> \"$src\" ..."
@ -327,6 +330,7 @@ for i in ${GOT_OPTS[@]}; do
-a|--auto ) INSTALL_DEP=1 ;;
-H|--hist|--history ) store_hist=1 ;;
-x ) store_config=1 ;;
--no-ssh ) unset HOME_SYMLINKS_SRC[0]; unset HOME_SYMLINKS_DST[0] ;;
* ) fmt_fatal "unknown option \"$i\"" ;;
esac
done

View File

@ -86,7 +86,6 @@ get_server_meta() {
RET_TRUST_SERVER=1
;;
* )
test -z "$domain" || fmt_warning "unknown domain: \"$domain\". will try as host name"
RET_HOSTNAME="$remote"
esac
}

View File

@ -38,7 +38,8 @@ test $(echo n | tools/common.sh ask_for_yN "test") = "0"
test $(echo | tools/common.sh ask_for_yN "test") = "0"
test $(echo | tools/common.sh ask_for_Yn "test") = "1"
test $(DFS_QUIET=1 tools/common.sh ask_for_Yn "test") = "1"
test "$(DFS_TRUST=1 riot time@is.impt:2222,yes@you-r.right,you@are.really.recht.,ibd.,try@it scp /tmp/ ./tmp -D 2>/dev/null)" = 'scp -P 12022 -o ControlMaster=auto -o ControlPath=/tmp/sshcm-%C -o PermitLocalCommand=yes -o ProxyJump=time@is.impt:2222,yes@you-r.right,you@are.really.recht.,ibd. -r try@it.ibd.ink:"/tmp/" "./tmp"'
test "$(DFS_TRUST=1 riot time@is.impt:2222/yes@you-r.right/you@are.really.recht./ibd./try@it,another@host scp /tmp/ ./tmp -D 2>/dev/null)" = 'scp -P 12022 -o ControlMaster=auto -o ControlPath=/tmp/sshcm-%C -o PermitLocalCommand=yes -o ProxyJump=time@is.impt:2222,yes@you-r.right,you@are.really.recht.,ibd. -r try@it.ibd.ink:"/tmp/" "./tmp"
scp -P 12022 -o ControlMaster=auto -o ControlPath=/tmp/sshcm-%C -o PermitLocalCommand=yes -o ForwardX11=yes -o ForwardAgent=yes -r another@host.ibd.ink:"/tmp/" "./tmp"'
# check alias
alias p114