From 23aef9d2338a85722f717f89f926ccfa5e3cfa72 Mon Sep 17 00:00:00 2001 From: sev Date: Sun, 31 Dec 2023 02:02:37 -0600 Subject: [PATCH] install.sh: replace test check with DOTFILES_TEST --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.47.0