]> git.sev.monster Git - dotfiles.git/commitdiff
install.sh: replace test check with DOTFILES_TEST
authorsev <git@sev.monster>
Sun, 31 Dec 2023 08:02:37 +0000 (02:02 -0600)
committersev <git@sev.monster>
Fri, 5 Apr 2024 21:27:41 +0000 (16:27 -0500)
install.sh

index fbe8f1f0762cdab640145d5afa701d0adba16362..49b6af84f3bef7dedab1af68b06825a92318ea65 100755 (executable)
@@ -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
 
This page took 0.040398 seconds and 4 git commands to generate.