2 # Mirror directory tree from remote to local server, keeping the path.
5 expect_n_args 2 "(server, directory)" "$@"
8 path_package=/tmp/delete.tar
13 ssh plom@"${server}" "cd \"${dir}\" && tar cf ${path_package} ."
14 scp plom@"${server}":"${path_package}" "${path_package}"
17 tar xf "${path_package}"
20 ssh plom@"${server}" rm "${path_package}"