mirror of
https://github.com/DictXiong/dotfiles.git
synced 2024-11-24 07:27:03 +08:00
Compare commits
3 Commits
5938ca8d22
...
41f910e31d
Author | SHA1 | Date | |
---|---|---|---|
|
41f910e31d | ||
|
dbba66ccd0 | ||
|
2ecdf945a9 |
5
.zshrc2
5
.zshrc2
|
@ -176,6 +176,11 @@ dfs()
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# motd
|
||||||
|
if [[ "$DFS_INITED" != "1" && -n "$DFS_UPDATE_CHANNEL" && "$DFS_UPDATE_CHANNEL" != "main" ]]; then
|
||||||
|
echo dotfiles not in the main channel. use with caution.
|
||||||
|
fi
|
||||||
|
|
||||||
# clean
|
# clean
|
||||||
unset i
|
unset i
|
||||||
export DFS_INITED=1
|
export DFS_INITED=1
|
||||||
|
|
15
scripts/riot
15
scripts/riot
|
@ -29,6 +29,14 @@ get_server_meta() {
|
||||||
RET_JUMP_SERVER="" # optional
|
RET_JUMP_SERVER="" # optional
|
||||||
# body
|
# body
|
||||||
local remote="$1"
|
local remote="$1"
|
||||||
|
# shortcuts
|
||||||
|
if [[ "$remote" == "i" ]]; then
|
||||||
|
remote="sir0.ibd"
|
||||||
|
elif [[ "$remote" == "x" ]]; then
|
||||||
|
remote="bj1.ibd"
|
||||||
|
elif [[ "$remote" == "j" ]]; then
|
||||||
|
remote="sir0.ibd:36122"
|
||||||
|
fi
|
||||||
# if in the form user@...
|
# if in the form user@...
|
||||||
if [[ "$remote" == *@* ]]; then
|
if [[ "$remote" == *@* ]]; then
|
||||||
RET_USERNAME=${remote%%@*}
|
RET_USERNAME=${remote%%@*}
|
||||||
|
@ -70,6 +78,13 @@ get_server_meta() {
|
||||||
RET_USERNAME=root
|
RET_USERNAME=root
|
||||||
RET_TRUST_SERVER=1
|
RET_TRUST_SERVER=1
|
||||||
;;
|
;;
|
||||||
|
box[0-9] )
|
||||||
|
RET_HOSTNAME=$host
|
||||||
|
RET_PORT=${RET_PORT:-12022}
|
||||||
|
RET_USERNAME=${RET_USERNAME:-root}
|
||||||
|
RET_JUMP_SERVER="root@$domain.ibd.ink:12022"
|
||||||
|
RET_TRUST_SERVER=1
|
||||||
|
;;
|
||||||
* )
|
* )
|
||||||
test -z "$domain" || fmt_warning "unknown domain: \"$domain\". will try as host name"
|
test -z "$domain" || fmt_warning "unknown domain: \"$domain\". will try as host name"
|
||||||
RET_HOSTNAME="$remote"
|
RET_HOSTNAME="$remote"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user