mirror of
https://github.com/DictXiong/dotfiles.git
synced 2026-11-23 20:38:16 +08:00
[refactor] clean, readable (#19)
* rebase zshrc, introduce DFS_NO_WALL * improve ci * improve ci * improve ci * update antigen url for DFS_NO_WALL * OK * improve ci for macos * improve test.zsh * staged * fix ci * fix ci * use local vars * introduce DFS_QUIET * mass mod install.sh * minor change * set DFS_DEV=1 to prevent update * debug: done -> fi * fix DFS_DEV * ubuntu.sh: set-mirror (ref: tuna) * preinstall_check * install.sh: -q to be quiet * install.sh: -d to DFS_DEV Co-authored-by: xiongdian.me <xiongdian.me@bytedance.com>
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
#!/bin/false "This script should be sourced in a shell, not executed directly"
|
||||
#!/bin/false "This script should be sourced in zsh, not executed directly"
|
||||
|
||||
set -ex
|
||||
|
||||
# check files
|
||||
cd /
|
||||
l
|
||||
cd ~
|
||||
l
|
||||
dfs cd
|
||||
l
|
||||
pwd
|
||||
test -f .zshrc2
|
||||
diff -q ./.ssh/authorized_keys2 ~/.ssh/authorized_keys2
|
||||
@@ -13,8 +17,10 @@ grep -q ".zshrc2" ~/.zshrc
|
||||
# check scripts and functions
|
||||
dfs version
|
||||
dfs log 1
|
||||
l
|
||||
z ~
|
||||
test ~ -ef "$(pwd)"
|
||||
dogo
|
||||
dfs cd
|
||||
tools/common.sh get_os_type
|
||||
tools/common.sh get_linux_dist
|
||||
|
||||
@@ -22,6 +28,12 @@ tools/common.sh get_linux_dist
|
||||
alias p114 > /dev/null
|
||||
|
||||
# check update
|
||||
DFS_VERSION=`dfs version`
|
||||
dfs update
|
||||
dfs version
|
||||
test `git rev-parse HEAD` = `curl -fsSL https://api.beardic.cn/get-var/dfs-commit-id`
|
||||
|
||||
# clean
|
||||
dfs cd
|
||||
git reset --hard $DFS_VERSION
|
||||
set +x
|
||||
Reference in New Issue
Block a user