dotfiles/tools/test.zsh
Dict Xiong f39193f28f
[core] parse func; gbes; .config/dotfiles/env (#29)
* common.sh: arg parse init

* bug fix

* bug fix

* bug fix. now common.sh won't parse arg autoly

* improve git-branches

* improve git-branches; util-linux

* accelerate ci

* improve gbes; PARSE_ARG_RET

* ci: fix gbes

* ssh: add key ltp1.bd

* Revert "ssh: add key ltp1.bd"

This reverts commit c2433a0549.

* install column; apt -> apt-get

Co-authored-by: xiongdian.me <xiongdian.me@bytedance.com>
2022-11-17 20:02:35 +08:00

51 lines
838 B
Bash

#!/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
grep -q ".zshrc2" ~/.zshrc
# check scripts and functions
dfs version
dfs log 1
z ~
test ~ -ef "$(pwd)"
dogo
doll
dfs cd
tools/common.sh get_os_type
tools/common.sh get_linux_dist
# check alias
alias p114
which sibd
piv-agent || which piv-agent
gbes || which gbes
# 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
git reset --hard $DFS_VERSION
# then check install.sh
./install.sh -l
dfs version
test `git rev-parse HEAD` = `curl -fsSL https://api.beardic.cn/get-var/dfs-commit-id`
# clean
git reset --hard $DFS_VERSION
set +x