# 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() {
-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