Skip to content
Advertisement

Zip command on Linux includes whole folder structure

I’m currently incorporating continuous integration on a project I’m working on at work using Bamboo. We are using ANT scripts to do the build automation, and as the final task we’re using the linux Zip command to create a release zip file. The problem is that the zip file contains the whole chain of folders leading up to the release folder which is not something I wish to include.

Currently I’m using the following ant call:

JavaScript

This creates the right .zip file with right password but inside instead of having the folders and contents of /release folder I have the whole path which is /var/…more directories…/master…/release/. I tried using -j argument but that fails cause there are two files with same name in different sub-folders inside the release folder.

Is there any way I can include only the release folder contents inside the .zip file?

Advertisement

Answer

Have you tried that:

JavaScript

If you do not want to see the release top directory, you can try that:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement