Fix symlink extraction over ssh

This commit is contained in:
Kovid Goyal
2022-03-03 21:24:45 +05:30
parent 8867317b6a
commit b4cc38a1d9
3 changed files with 48 additions and 4 deletions
+1
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";
}