Respectable projects release tar archives that contain a single directory, for instance zyrgus-3.18.tar.gz contains a zyrgus-3.18 folder which in turn contains src, build, dist, etc.
But some punk projects put everything at the root :'-( This results in a total messtotal mess when unarchiving. Creating a folder manually every time is a pain, and unnecessary most of the time.
- Is there a super-fast way to tell whether a .tar or .tar.gz file contains more than a single directory at its root? Even for a big archive.
- Or even better, is there a tool that in such cases would create a directory (name of the archive without the extension) and put everything inside?