17
1
I have project with the usual directory structure (src/, bin/, ...), i.e
project-name/
|-- bin
|-- lib
|-- src
`-- Makefile
And would like to create an archive with the following directory structure:
project-name-version/
|-- bin
|-- lib
|-- src
`-- Makefile
Is there a neat way to do this, which avoids creating a temporary directory project-name/
elsewhere, then copying the files inside a finally calling zip -r ...
on that temporary directory?
(I am basically looking for some kind of path prefix or relative path option.)
1This also works with
tar
if you use the-h
flag. – Kyle Strand – 2016-09-28T01:18:43.703(I'm also using the
z
flag; I'm not sure if that affects it.) – Kyle Strand – 2016-09-28T01:23:32.513