1
0
mirror of https://github.com/TheLocehiliosan/yadm synced 2026-03-02 03:49:29 +00:00

Gracefully handle changes in yadm.cygwin-copy

This commit is contained in:
Tim Byrne
2017-06-01 07:58:23 -05:00
parent f8e0bd593d
commit 7538851fe3
2 changed files with 32 additions and 0 deletions

3
yadm
View File

@@ -199,6 +199,9 @@ function alt() {
debug "Linking $alt_path to $new_link"
[ -n "$loud" ] && echo "Linking $alt_path to $new_link"
if [ "$do_copy" -eq 1 ]; then
if [ -L "$new_link" ]; then
rm -f "$new_link"
fi
cp -f "$alt_path" "$new_link"
else
ln -nfs "$alt_path" "$new_link"