Hello.
I'm writing a CMake script for repo downloading and building. I've managed to download zip from bitbucket and unpack it, but now I'm facing a huge inconvenience.
Say, my zip url is: "https://bitbucket.org/user/repo/get/branch.zip"
But it is downloaded not as branch.zip, but as user-repo-e2b82ab68a7a.zip
I still can set destination filename to something universal like "repo.zip" so it is not very bad.
The real problem is that I need to unpack this archive and obtain a snapshot of my branch, but it is not in a zip root but in a directory with the same unpredictable "user-repo-e2b82ab68a7a" name. So trivial unpacking turns into obtaining a name of the root directory, then moving all unpacked files from it to its parent directory and finally deleting empty root dir.
May be you could add some http switch like https://bitbucket.org/user/repo/get/branch.zip?root=0 to pack a repository directly into zip without autogenerated root, or at least make this root name completely predictable so we need no scanning unpacked content / somehow detecting zip name as it comes from server?
If I'm missing some good approach to do what I want, please point me on it. Thanks in advance.