Find the answer to your Linux question:
Results 1 to 5 of 5
Hi All, I have a C++ application consisting of several source/header files. As part of the release management procedure, I use a shell script to package all necessary sources/headers in ...
  1. #1
    Just Joined!
    Join Date
    Nov 2009
    Posts
    43

    Question regarding packaging a software release

    Hi All,

    I have a C++ application consisting of several source/header files.

    As part of the release management procedure, I use a shell script to package all necessary sources/headers in a tar file for a successful compilation on end-user site.

    However, for example, each time a new directory is created within application's source tree, I need to edit the shell script to implement necessary changes, which is error-prone.

    What is the best practice to package the source/header files of an application into a tar file ? Is there any tool that I can use for packaging purposes rather than writing my own shell scripts ? For example, how is Linux kernel itself packaged into a tar file ?

    I use Ubuntu 9.10.

    Thanks.

  2. #2
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    So the cool thing about tar is that it can take a directory as an argument. Therefore, why not just have all of your source code / tarball materials in one big tree, and package the whole thing?
    DISTRO=Arch
    Registered Linux User #388732

  3. #3
    Just Joined!
    Join Date
    Nov 2009
    Posts
    43
    Quote Originally Posted by Cabhan View Post
    So the cool thing about tar is that it can take a directory as an argument. Therefore, why not just have all of your source code / tarball materials in one big tree, and package the whole thing?
    I am just trying to learn how to do things in the right way...

    My source tree actually does not contain only source/header files.

    Additionally, it contains some test data and documentation which I do not want to put into tarball.

  4. #4
    Linux User
    Join Date
    Jan 2006
    Posts
    414
    so create file which lists all the files you *don't* wont included and then use the --exclude-from argument when making the tarball.

    "The right way" though would probably be not to put random files in your source tree, that way you can just tar -cjf and not worry about it.

  5. #5
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    Ah, my apologies. I didn't mean to sound sarcastic; I was trying to point out a feature .

    If you're going to be sending out a distribution, documentation and test cases aren't actually bad things to include. That way, end users can run the tests to make sure that the distribution runs, and documentation is always a good thing.

    But if you really don't want to include them, then darkrose is correct, and you can use tar's --exclude or --exclude-from flags.
    DISTRO=Arch
    Registered Linux User #388732

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...