mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-09-01 06:41:30 +00:00
Fix ln failing if link exists
This commit is contained in:
parent
1c0d254ec6
commit
ad7c251f56
1 changed files with 1 additions and 1 deletions
|
|
@ -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";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue