From: sev Date: Sun, 31 Dec 2023 08:02:37 +0000 (-0600) Subject: install.sh: replace test check with DOTFILES_TEST X-Git-Url: https://git.sev.monster/~sev/dotfiles.git/commitdiff_plain/23aef9d2338a85722f717f89f926ccfa5e3cfa72?ds=sidebyside install.sh: replace test check with DOTFILES_TEST --- diff --git a/install.sh b/install.sh index fbe8f1f..49b6af8 100755 --- a/install.sh +++ b/install.sh @@ -19,7 +19,7 @@ cache="${XDG_CACHE_HOME#$DEST/}" # test devnull=/dev/null -if [ "$1" = "test" ]; then +if [ ${DOTFILES_TEST+x} = x ]; then echo "Running test -- no changes will be applied" devnull=/dev/stdout _cd() { @@ -69,7 +69,7 @@ find . "$share" "$etc" \ -xdev -mindepth 1 -maxdepth 1 -type l -exec sh -c ' r="$(realpath "{}")" [ "${r#'"$SRC"'/}" != "$r" ] && - '"$([ "$1" = test ] && echo 'echo +++ ')"'unlink "{}"' \; + '"$([ ${DOTFILES_TEST+x} = x ] && echo 'echo +++ ')"'unlink "{}"' \; cd "$SRC" >$devnull