From ad7c251f56162a27dc058bd0bb9279cfe5b529f4 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 4 Mar 2022 07:08:04 +0530 Subject: [PATCH] Fix ln failing if link exists --- shell-integration/ssh/bootstrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell-integration/ssh/bootstrap.sh b/shell-integration/ssh/bootstrap.sh index 38e08caf7..2d6c07fc7 100644 --- a/shell-integration/ssh/bootstrap.sh +++ b/shell-integration/ssh/bootstrap.sh @@ -41,7 +41,7 @@ mv_files_and_dirs() { cwd="$PWD"; cd "$1"; command find . -type d -exec mkdir -p "$2/{}" ";" - command find . -type l -exec sh -c "tgt=\$(command readlink -n \"{}\"); command ln -s \"\$tgt\" \"$2/{}\"; command rm -f \"{}\"" ";" + command find . -type l -exec sh -c "tgt=\$(command readlink -n \"{}\"); command ln -sf \"\$tgt\" \"$2/{}\"; command rm -f \"{}\"" ";" command find . -type f -exec mv "{}" "$2/{}" ";" cd "$cwd"; }