diff --git a/.update.sh b/.update.sh index b82bb5e..322ee86 100644 --- a/.update.sh +++ b/.update.sh @@ -35,7 +35,7 @@ if [[ "$(git rev-parse HEAD)" == "$DFS_COMMIT" ]]; then fmt_info "nothing to do" else fmt_info "checking out to commit $DFS_COMMIT ..." - if [[ -z "$DFS_DEV" ]]; then + if [[ -z "$DFS_DEV" || "$DFS_DEV" == "0" ]]; then post_beacon "dfs.updated" git -c advice.detachedHead=false checkout $DFS_COMMIT cp ./.update.sh ./update.sh && chmod +x ./update.sh && exit $DFS_UPDATED_RET diff --git a/tools/alpine.sh b/tools/alpine.sh index 57f9b2e..ba32b54 100755 --- a/tools/alpine.sh +++ b/tools/alpine.sh @@ -15,7 +15,7 @@ apk_add() # lite apk add zsh bash git tmux vim curl fzf iputils coreutils util-linux # full - if [[ -z "$DFS_LITE" ]]; then + if [[ -z "$DFS_LITE" || "$DFS_LITE" == "0" ]]; then apk add wget python3 py3-pip htop gcc g++ cmake make perl linux-headers bind-tools man-db fi } diff --git a/tools/common.sh b/tools/common.sh index 2e38c85..7d65a68 100755 --- a/tools/common.sh +++ b/tools/common.sh @@ -6,7 +6,7 @@ if [[ -f ~/.config/dotfiles/env ]]; then set -a; source ~/.config/dotfiles/env; # Color settings # Source: https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -if [ -t 1 ]; then +if [[ -t 1 || "$DFS_COLOR" == "1" ]]; then is_tty() { true } @@ -110,6 +110,8 @@ parse_arg() if [[ -z "$ARG" ]]; then ARG=$1; shift; fi case $ARG in -q*|--quite ) export DFS_QUIET=1 ;; + -l*|--lite ) export DFS_LITE=1 ;; + --color ) export DFS_COLOR=1; is_tty() { true }; setup_color ;; --* ) PARSE_ARG_RET+=("$ARG") ;; -* ) PARSE_ARG_RET+=("${ARG:0:2}") ;; * ) PARSE_ARG_RET+=("$ARG") ;; diff --git a/tools/msys2.sh b/tools/msys2.sh index 350a789..a1c7c6b 100755 --- a/tools/msys2.sh +++ b/tools/msys2.sh @@ -17,7 +17,7 @@ pacman_S() # lite pacman -S tmux git zsh bash curl vim # full - if [[ -z "$DFS_LITE" ]]; then + if [[ -z "$DFS_LITE" || "$DFS_LITE" == "0" ]]; then pacman -S wget base-devel mingw-w64-x86_64-toolchain make cmake gcc zip unzip python3 python3-pip man-pages-posix fi } diff --git a/tools/ubuntu.sh b/tools/ubuntu.sh index 88917b6..483c2f8 100755 --- a/tools/ubuntu.sh +++ b/tools/ubuntu.sh @@ -16,7 +16,7 @@ apt_install() # lite apt-get install -y git zsh bash tmux vim curl inetutils-ping less bsdmainutils # full - if [[ -z "$DFS_LITE" ]]; then + if [[ -z "$DFS_LITE" || "$DFS_LITE" == "0" ]]; then apt-get install wget dialog net-tools dnsutils netcat traceroute sudo python3 python3-pip cron openssh-client openssh-server htop gcc g++ cmake make zip for i in {fzf,ripgrep,man-db}; do apt-get install -y $i; done fi