mirror of
https://github.com/DictXiong/dotfiles.git
synced 2026-11-23 20:38:16 +08:00
[dev] ddns; better ssh agent; riot sshl; sys.online; zsh hist import; DFS_DEBUG; cbd/cbds (#36)
* riot: bj1 -> proxy * ci: test ask_for_yn * --wip-- [skip ci] * install.sh: will prompt version * zshrc: piv-agent now can re-use agents * zshrc: in docker use theme robbyrussell * update.sh: will send online beacon * beacon: support meta with limited len 64 * bug fix (Sat Jan 21 16:45:35 CST 2023) * well, finally add ssh key for ltp1-bd * set DFS_INITED and do not send login beacon if it was set * rewrite piv-agent to sagent; fmt_note and fmt_into will write to stderr * bug fix (Mon Jan 30 19:41:00 CST 2023) * bug fix (Mon Jan 30 19:46:27 CST 2023) * login beacon add details * $DFS_ORPHAN turns logger off * disable more beacons in CI * install.sh: prepare config earlier * init pbin * install.sh: -H|--hist|--history * install.sh: -H hint * install.sh: -H support multiple keys * fix zsh hist with no new line at the end * remove ^M in hist * bug fix (Wed Feb 1 21:11:41 CST 2023) * bug fix (Wed Feb 1 21:16:29 CST 2023) * bug fix (Wed Feb 1 21:20:21 CST 2023) * ci will send gh.ci.fail * show install opts * DFS_DEBUG to set -x * bug fix: install.sh re-start itself with no args incorrectly * bug fix (Thu Feb 2 18:43:16 CST 2023) * riot: ob->ebd, swap option $1 and $2 and $2 is default to ssh * riot: introduce sshl * logger.sh: support ddns * bug fix (Wed Mar 1 16:37:42 CST 2023) * dfs.ddns.failed -> dfs.ddns.fail * login beacon 2>/dev/null * logger.sh -> frigg-client.sh; curl add time limit 10s * to-install.sh: improve docker-ce * use $DFS_CURL_OPTIONS * ci: add ddns * bug fix (Wed Mar 15 19:37:21 CST 2023) * Revert "bug fix (Wed Mar 15 19:37:21 CST 2023)" This reverts commit2df87ce1a8. * Revert "ci: add ddns" This reverts commit4fe8321504. * alias cbd and cbds, riot nasp port to 12022 * .zshrc: sagent -> sagt * fix ci * riot: bug fix when 'tmp' has leading zeros * add ci for cbds --------- Co-authored-by: xiongdian.me <xiongdian.me@bytedance.com>
This commit is contained in:
20
install.sh
20
install.sh
@@ -109,6 +109,12 @@ prepare_config()
|
||||
echo
|
||||
}
|
||||
|
||||
append_hist()
|
||||
{
|
||||
fmt_note "appending zsh history ..."
|
||||
"$DOTFILES/tools/append_zsh_hist.sh" "$@"
|
||||
}
|
||||
|
||||
install_file_content()
|
||||
{
|
||||
fmt_note "installing file content ..."
|
||||
@@ -249,7 +255,7 @@ install_update()
|
||||
RET=$?
|
||||
if [[ $RET == 85 ]]; then
|
||||
fmt_note "dfs updated. re-running install.sh ..."
|
||||
"${DOTFILES}/install.sh" "$@" && exit
|
||||
"${DOTFILES}/install.sh" "${ORIGIN_ARGS[@]}" && exit
|
||||
elif [[ $RET != 0 ]]; then
|
||||
fmt_fatal "update.sh failed with exit code $RET"
|
||||
fi
|
||||
@@ -265,9 +271,9 @@ uninstall_update()
|
||||
install()
|
||||
{
|
||||
if [[ "$INSTALL_DEP" == "1" ]]; then install_dependencies; fi
|
||||
prepare_config
|
||||
install_update
|
||||
preinstall_check
|
||||
prepare_config
|
||||
install_crontab
|
||||
install_file_content
|
||||
install_symlink
|
||||
@@ -275,6 +281,7 @@ install()
|
||||
# those that won't be uninstalled in the future
|
||||
install_tmux_tpm
|
||||
install_vim_vundle
|
||||
if [[ -n "$DFS_HIST" ]]; then append_hist "$DFS_HIST"; fi
|
||||
fmt_note "done installing!"
|
||||
}
|
||||
|
||||
@@ -292,21 +299,30 @@ uninstall()
|
||||
fmt_note "done uninstalling!"
|
||||
}
|
||||
|
||||
echo "this is the dotfiles installer, version $(cd "$DOTFILES" && git describe --tags --always --dirty)"
|
||||
echo "install options:" "${GOT_OPTS[@]}"
|
||||
FUNC=install
|
||||
INSTALL_DEP=0
|
||||
store_config=0
|
||||
store_hist=0
|
||||
for i in ${GOT_OPTS[@]}; do
|
||||
if [[ "$store_config" == "1" ]]; then
|
||||
store_config=0
|
||||
DFS_CONFIGS+=("$i")
|
||||
continue
|
||||
fi
|
||||
if [[ "$store_hist" == "1" ]]; then
|
||||
store_hist=0
|
||||
DFS_HIST=$i
|
||||
continue
|
||||
fi
|
||||
case $i in
|
||||
-i ) FUNC=install ;;
|
||||
-r ) FUNC=uninstall ;;
|
||||
-d|--dev ) export DFS_DEV=1; set -x ;;
|
||||
-a|--auto ) INSTALL_DEP=1 ;;
|
||||
-s|--secure ) export DFS_DEV=0 ;;
|
||||
-H|--hist|--history ) store_hist=1 ;;
|
||||
-x ) store_config=1 ;;
|
||||
* ) fmt_fatal "unknown option \"$i\"" ;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user