Fix symlink extraction over ssh

This commit is contained in:
Kovid Goyal
2022-02-28 12:59:26 +05:30
parent 8867317b6a
commit b4cc38a1d9
3 changed files with 48 additions and 4 deletions

View File

@@ -41,6 +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 f -exec mv "{}" "$2/{}" ";"
cd "$cwd";
}