DFS_DEBUG to set -x

This commit is contained in:
xiongdian.me 2023-02-02 17:49:50 +08:00
parent f4be2e94d7
commit 7a7bc4ce85

View File

@ -3,6 +3,7 @@ set -e
THIS_DIR_COMMON_SH=$( cd "$( dirname "${BASH_SOURCE[0]:-${(%):-%x}}" )" && pwd )
export DOTFILES=$( cd "$THIS_DIR_COMMON_SH/.." && pwd )
if [[ -f ~/.config/dotfiles/env ]]; then set -a; source ~/.config/dotfiles/env; set +a; fi
if [[ "$DFS_DEBUG" == "1" ]]; then set -x; fi
# parse args and set env, when it is sourced
# todo: make this skipable